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 29768)
+++ /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 29768)
+++ /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 29768)
+++ /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 29768)
+++ /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 29768)
+++ /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 29768)
+++ /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 29768)
+++ /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 29768)
+++ /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
Index: /applications/editors/josm/plugins/imagerycache/nbproject/project.xml
===================================================================
--- /applications/editors/josm/plugins/imagerycache/nbproject/project.xml	(revision 29768)
+++ /applications/editors/josm/plugins/imagerycache/nbproject/project.xml	(revision 29769)
@@ -17,8 +17,6 @@
                 </source-folder>
                 <source-folder>
-                    <label>src</label>
-                    <type>java</type>
-                    <location>src</location>
-                    <encoding>UTF-8</encoding>
+                    <label>F:\Java\josm\core\src</label>
+                    <location>F:\Java\josm\core\src</location>
                 </source-folder>
                 <source-folder>
@@ -27,8 +25,4 @@
                     <location>F:\Java\josm\core\src</location>
                     <encoding>UTF-8</encoding>
-                </source-folder>
-                <source-folder>
-                    <label>F:\Java\josm\core\src</label>
-                    <location>F:\Java\josm\core\src</location>
                 </source-folder>
             </folders>
@@ -54,8 +48,4 @@
                 <items>
                     <source-folder style="packages">
-                        <label>src</label>
-                        <location>src</location>
-                    </source-folder>
-                    <source-folder style="packages">
                         <label>F:\Java\josm\core\src</label>
                         <location>F:\Java\josm\core\src</location>
@@ -77,10 +67,6 @@
         <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/3">
             <compilation-unit>
-                <package-root>src</package-root>
+                <package-root>F:\Java\josm\core\src</package-root>
                 <classpath mode="compile">../../core/src</classpath>
-                <source-level>1.6</source-level>
-            </compilation-unit>
-            <compilation-unit>
-                <package-root>F:\Java\josm\core\src</package-root>
                 <source-level>1.6</source-level>
             </compilation-unit>
Index: /applications/editors/josm/plugins/imagerycache/src/org/openstreetmap/josm/plugins/imagerycache/OsmDBTilesLoader.java
===================================================================
--- /applications/editors/josm/plugins/imagerycache/src/org/openstreetmap/josm/plugins/imagerycache/OsmDBTilesLoader.java	(revision 29768)
+++ /applications/editors/josm/plugins/imagerycache/src/org/openstreetmap/josm/plugins/imagerycache/OsmDBTilesLoader.java	(revision 29769)
@@ -14,4 +14,6 @@
 import org.openstreetmap.gui.jmapviewer.OsmTileLoader;
 import org.openstreetmap.gui.jmapviewer.Tile;
+import org.openstreetmap.gui.jmapviewer.interfaces.CachedTileLoader;
+import org.openstreetmap.gui.jmapviewer.interfaces.TileClearController;
 import org.openstreetmap.gui.jmapviewer.interfaces.TileJob;
 import org.openstreetmap.gui.jmapviewer.interfaces.TileLoaderListener;
@@ -24,5 +26,5 @@
  * @author Alexei Kasatkin, based on OsmFileCacheTileLoader by @author Jan Peter Stotz, @author Stefan Zeller
  */
-class OsmDBTilesLoader extends OsmTileLoader {
+class OsmDBTilesLoader extends OsmTileLoader implements CachedTileLoader {
     
     
@@ -49,4 +51,14 @@
     }
 
+    @Override
+    public void clearCache(TileSource source) {
+        clearCache(source, null);
+    }
+
+    @Override
+    public void clearCache(TileSource source, TileClearController controller) {
+        dao.cleanStorage(source.getName());
+    }
+    
     protected class DatabaseLoadJob implements TileJob {
 
Index: /applications/editors/josm/plugins/imagerycache/src/org/openstreetmap/josm/plugins/imagerycache/TileDAOMapDB.java
===================================================================
--- /applications/editors/josm/plugins/imagerycache/src/org/openstreetmap/josm/plugins/imagerycache/TileDAOMapDB.java	(revision 29768)
+++ /applications/editors/josm/plugins/imagerycache/src/org/openstreetmap/josm/plugins/imagerycache/TileDAOMapDB.java	(revision 29769)
@@ -6,4 +6,5 @@
 import org.mapdb.DB;
 import org.mapdb.DBMaker;
+import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.preferences.BooleanProperty;
 
@@ -186,3 +187,17 @@
     }
 
+    public void cleanStorage(String name) {
+        Main.info("Cleaning storage: {0}", name);
+        dbs.get(name).close();
+        for (int t=0; t<20; t++) {
+            try {
+                String fname = getDBFileName(name, t);
+                File f = new File(cacheFolder, fname);
+                if (!f.exists() || !f.canWrite()) continue;
+                f.delete();
+            } catch (Exception e) {
+                Main.warn("Can not delete file");
+            }
+        }
+    }
 }
Index: /applications/editors/josm/plugins/livegps/nbproject/project.xml
===================================================================
--- /applications/editors/josm/plugins/livegps/nbproject/project.xml	(revision 29769)
+++ /applications/editors/josm/plugins/livegps/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>livegps</name>
+        </general-data>
+        <general-data xmlns="http://www.netbeans.org/ns/freeform-project/2">
+            <!-- Не используйте диалоговое окно свойств проекта при редактировании данного файла вручную. -->
+            <name>livegps</name>
+            <properties/>
+            <folders>
+                <source-folder>
+                    <label>src</label>
+                    <type>java</type>
+                    <location>src</location>
+                    <encoding>UTF-8</encoding>
+                </source-folder>
+                <source-folder>
+                    <label>livegps</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>install</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/livegps/src/livegps/AppendableGpxTrackSegment.java
===================================================================
--- /applications/editors/josm/plugins/livegps/src/livegps/AppendableGpxTrackSegment.java	(revision 29768)
+++ /applications/editors/josm/plugins/livegps/src/livegps/AppendableGpxTrackSegment.java	(revision 29769)
@@ -19,8 +19,10 @@
     private double length;
 
+    @Override
     public Bounds getBounds() {
         return bounds;
     }
 
+    @Override
     public Collection<WayPoint> getWayPoints() {
         return new CopyList<WayPoint>(wayPoints, size);
@@ -51,4 +53,5 @@
     }
 
+    @Override
     public double length() {
         return length;
Index: /applications/editors/josm/plugins/livegps/src/livegps/LiveGpsAcquirer.java
===================================================================
--- /applications/editors/josm/plugins/livegps/src/livegps/LiveGpsAcquirer.java	(revision 29768)
+++ /applications/editors/josm/plugins/livegps/src/livegps/LiveGpsAcquirer.java	(revision 29769)
@@ -3,5 +3,4 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
-import java.lang.Float;
 
 import java.beans.PropertyChangeEvent;
@@ -16,5 +15,4 @@
 
 import org.openstreetmap.josm.Main;
-import org.openstreetmap.josm.data.coor.LatLon;
 
 import org.json.JSONObject;
@@ -118,4 +116,5 @@
     }
 
+    @Override
     public void run() {
         LiveGpsData oldGpsData = null;
@@ -133,5 +132,5 @@
                         Thread.sleep(1000);
                     } catch (InterruptedException ignore) {}
-		};
+		}
 	    }
 
@@ -167,5 +166,5 @@
                 try {
                     Thread.sleep(1000);
-                } catch (InterruptedException ignore) {} ;
+                } catch (InterruptedException ignore) {} 
                 // send warning to layer
             }
@@ -235,5 +234,5 @@
                 Watch.put("enable", true);
                 Watch.put("json", true);
-            } catch (JSONException je) {};
+            } catch (JSONException je) {}
 
             String Request = "?WATCH=" + Watch.toString() + ";\n";
Index: /applications/editors/josm/plugins/livegps/src/livegps/LiveGpsDialog.java
===================================================================
--- /applications/editors/josm/plugins/livegps/src/livegps/LiveGpsDialog.java	(revision 29768)
+++ /applications/editors/josm/plugins/livegps/src/livegps/LiveGpsDialog.java	(revision 29769)
@@ -6,5 +6,4 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
-import java.awt.BorderLayout;
 import java.awt.Color;
 import java.awt.GridLayout;
@@ -15,5 +14,4 @@
 import javax.swing.JLabel;
 import javax.swing.JPanel;
-import javax.swing.JScrollPane;
 
 import org.openstreetmap.josm.gui.MapFrame;
Index: /applications/editors/josm/plugins/livegps/src/livegps/LiveGpsPlugin.java
===================================================================
--- /applications/editors/josm/plugins/livegps/src/livegps/LiveGpsPlugin.java	(revision 29768)
+++ /applications/editors/josm/plugins/livegps/src/livegps/LiveGpsPlugin.java	(revision 29769)
@@ -52,4 +52,5 @@
         }
 
+        @Override
         public void actionPerformed(ActionEvent e) {
             enableTracking(lgpscapture.isSelected());
@@ -66,4 +67,5 @@
         }
 
+        @Override
         public void actionPerformed(ActionEvent e) {
             if (lgpslayer != null) {
@@ -84,4 +86,5 @@
         }
 
+        @Override
         public void actionPerformed(ActionEvent e) {
             if (lgpslayer != null) {
@@ -91,10 +94,13 @@
     }
 
+    @Override
     public void activeLayerChange(Layer oldLayer, Layer newLayer) {
     }
 
+    @Override
     public void layerAdded(Layer newLayer) {
     }
 
+    @Override
     public void layerRemoved(Layer oldLayer) {
         if (oldLayer != lgpslayer)
@@ -110,7 +116,12 @@
         super(info);
         MainMenu menu = Main.main.menu;
-        lgpsmenu = menu.addMenu(marktr("LiveGPS"), KeyEvent.VK_G,
-                menu.defaultMenuPos, ht("/Plugin/LiveGPS"));
-
+        boolean oldMenu = org.openstreetmap.josm.data.Version.getInstance().getVersion() < 6082;
+        lgpsmenu = oldMenu ?
+                menu.addMenu(marktr("LiveGPS"), KeyEvent.VK_G, menu.defaultMenuPos, ht("/Plugin/LiveGPS"))
+                : menu.gpsMenu;
+        if (lgpsmenu.getItemCount()>0) {
+            lgpsmenu.addSeparator();
+        }
+            
         JosmAction captureAction = new CaptureAction();
         lgpscapture = new JCheckBoxMenuItem(captureAction);
Index: /applications/editors/josm/plugins/livegps/src/livegps/SingleSegmentGpxTrack.java
===================================================================
--- /applications/editors/josm/plugins/livegps/src/livegps/SingleSegmentGpxTrack.java	(revision 29768)
+++ /applications/editors/josm/plugins/livegps/src/livegps/SingleSegmentGpxTrack.java	(revision 29769)
@@ -20,16 +20,20 @@
 
 
+    @Override
     public Map<String, Object> getAttributes() {
         return attr;
     }
 
+    @Override
     public Bounds getBounds() {
         return trackSegment.getBounds();
     }
 
+    @Override
     public Collection<GpxTrackSegment> getSegments() {
         return Collections.singleton(trackSegment);
     }
 
+    @Override
     public double length() {
         return trackSegment.length();
Index: /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/OdPlugin.java
===================================================================
--- /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/OdPlugin.java	(revision 29768)
+++ /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/OdPlugin.java	(revision 29769)
@@ -96,5 +96,9 @@
         loadModules();
         // Add menu
-        menu = Main.main.menu.addMenu(marktr("Open Data"), KeyEvent.VK_O, Main.main.menu.defaultMenuPos, ht("/Plugin/OpenData"));
+        boolean oldMenu = org.openstreetmap.josm.data.Version.getInstance().getVersion() < 6082;
+        
+        menu = oldMenu?
+            Main.main.menu.addMenu(marktr("Open Data"), KeyEvent.VK_O, Main.main.menu.defaultMenuPos, ht("/Plugin/OpenData"))
+            : Main.main.menu.dataMenu;
         buildMenu();
         // Add download task
Index: /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/actions/OpenPreferencesActions.java
===================================================================
--- /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/actions/OpenPreferencesActions.java	(revision 29768)
+++ /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/actions/OpenPreferencesActions.java	(revision 29769)
@@ -31,5 +31,5 @@
     public OpenPreferencesActions() {
     	super(false);
-        putValue(NAME, tr("Preferences"));
+        putValue(NAME, tr("OpenData preferences"));
         putValue(SMALL_ICON, ImageProvider.get("dialogs", ICON_CORE_24));
 		putValue("toolbar", "opendata_open_preferences");
Index: /applications/editors/josm/plugins/reverter/nbproject/project.xml
===================================================================
--- /applications/editors/josm/plugins/reverter/nbproject/project.xml	(revision 29768)
+++ /applications/editors/josm/plugins/reverter/nbproject/project.xml	(revision 29769)
@@ -41,4 +41,8 @@
                     <target>dist</target>
                 </action>
+                <action name="run">
+                    <script>${ant.script}</script>
+                    <target>runjosm</target>
+                </action>
             </ide-actions>
             <export>
@@ -62,4 +66,5 @@
                     <ide-action name="rebuild"/>
                     <ide-action name="clean"/>
+                    <ide-action name="run"/>
                 </context-menu>
             </view>
Index: /applications/editors/josm/plugins/reverter/src/reverter/ObjectsHistoryAction.java
===================================================================
--- /applications/editors/josm/plugins/reverter/src/reverter/ObjectsHistoryAction.java	(revision 29768)
+++ /applications/editors/josm/plugins/reverter/src/reverter/ObjectsHistoryAction.java	(revision 29769)
@@ -20,4 +20,5 @@
         setEnabled(false);
     }
+    @Override
     public void actionPerformed(ActionEvent arg0) {
         new ObjectsHistoryDialog().setVisible(true);
Index: /applications/editors/josm/plugins/reverter/src/reverter/RevertChangesetAction.java
===================================================================
--- /applications/editors/josm/plugins/reverter/src/reverter/RevertChangesetAction.java	(revision 29768)
+++ /applications/editors/josm/plugins/reverter/src/reverter/RevertChangesetAction.java	(revision 29769)
@@ -23,4 +23,5 @@
     }
 
+    @Override
     public void actionPerformed(ActionEvent arg0)  {
         final ChangesetIdQuery dlg = new ChangesetIdQuery();
Index: /applications/editors/josm/plugins/reverter/src/reverter/ReverterPlugin.java
===================================================================
--- /applications/editors/josm/plugins/reverter/src/reverter/ReverterPlugin.java	(revision 29768)
+++ /applications/editors/josm/plugins/reverter/src/reverter/ReverterPlugin.java	(revision 29769)
@@ -19,6 +19,8 @@
     public ReverterPlugin(PluginInformation info) {
         super(info);
-        JMenu historyMenu = Main.main.menu.addMenu(marktr("History"), KeyEvent.VK_Y,
-                Main.main.menu.defaultMenuPos,ht("/Plugin/Reverter"));
+        boolean oldMenu = org.openstreetmap.josm.data.Version.getInstance().getVersion() < 6082;
+        JMenu historyMenu = oldMenu?
+                Main.main.menu.addMenu(marktr("History"), KeyEvent.VK_Y,  Main.main.menu.defaultMenuPos, ht("/Plugin/Reverter"))
+                : Main.main.menu.dataMenu;
         //MainMenu.add(historyMenu, new ObjectsHistoryAction());
         MainMenu.add(historyMenu, new RevertChangesetAction());
Index: /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/UtilsPlugin2.java
===================================================================
--- /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/UtilsPlugin2.java	(revision 29768)
+++ /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/UtilsPlugin2.java	(revision 29769)
@@ -71,23 +71,35 @@
     public UtilsPlugin2(PluginInformation info) {
         super(info);
-
-        JMenu toolsMenu = Main.main.menu.addMenu(marktr("More tools"), KeyEvent.VK_Q, 4, "help");
-        unglueRelation = MainMenu.add(toolsMenu, new UnGlueRelationAction());
+        boolean oldMenu = org.openstreetmap.josm.data.Version.getInstance().getVersion() < 6082;
+        JMenu toolsMenu = oldMenu
+                ?  Main.main.menu.addMenu(marktr("More tools"), KeyEvent.VK_Q, 4, "help")
+                :  Main.main.menu.moreToolsMenu;
+        
+        JMenu dataMenu = oldMenu ? toolsMenu: Main.main.menu.dataMenu;
+                
         addIntersections = MainMenu.add(toolsMenu, new AddIntersectionsAction());
         splitObject = MainMenu.add(toolsMenu, new SplitObjectAction());
-        
+        alignWayNodes = MainMenu.add(toolsMenu, new AlignWayNodesAction());
+        symmetry = MainMenu.add(toolsMenu, new SymmetryAction());
+        splitOnIntersections = MainMenu.add(toolsMenu, new SplitOnIntersectionsAction());
+        unglueRelation = MainMenu.add(toolsMenu, new UnGlueRelationAction());
         toolsMenu.addSeparator();
         replaceGeometry = MainMenu.add(toolsMenu, new ReplaceGeometryAction());
+        extractPoint = MainMenu.add(toolsMenu, new ExtractPointAction());
         tagBuffer = MainMenu.add(toolsMenu, new TagBufferAction());
         sourceTag = MainMenu.add(toolsMenu, new TagSourceAction());
         pasteRelations = MainMenu.add(toolsMenu, new PasteRelationsAction());
-        alignWayNodes = MainMenu.add(toolsMenu, new AlignWayNodesAction());
-        splitOnIntersections = MainMenu.add(toolsMenu, new SplitOnIntersectionsAction());
-        extractPoint = MainMenu.add(toolsMenu, new ExtractPointAction());
-        symmetry = MainMenu.add(toolsMenu, new SymmetryAction());
-        wiki = MainMenu.add(toolsMenu, new OpenPageAction());
+        wiki = MainMenu.add(dataMenu, new OpenPageAction());
         latlon = MainMenu.add(toolsMenu, new LatLonAction());
-
-        JMenu selectionMenu = Main.main.menu.addMenu(marktr("Selection"), KeyEvent.VK_N, Main.main.menu.defaultMenuPos, "help");
+        drawArc = MainMenu.add(toolsMenu, new CurveAction());
+
+        JMenu selectionMenu;
+        if (oldMenu) {
+            selectionMenu = Main.main.menu.addMenu(marktr("Selection"), KeyEvent.VK_N, 4, "help");
+        } else {
+            selectionMenu = Main.main.menu.selectionMenu;
+            selectionMenu.addSeparator();
+        }
+        
         selectWayNodes = MainMenu.add(selectionMenu, new SelectWayNodesAction());
         adjNodes = MainMenu.add(selectionMenu, new AdjacentNodesAction());
@@ -105,7 +117,6 @@
         selectAreaBoundary = MainMenu.add(selectionMenu, new SelectBoundaryAction());
         
-        selectURL = MainMenu.add(toolsMenu, new ChooseURLAction());
-	drawArc = MainMenu.add(toolsMenu, new CurveAction());
-
+        selectURL = MainMenu.add(dataMenu, new ChooseURLAction());
+	
         // register search operators
         SearchCompiler.addMatchFactory(new UtilsUnaryMatchFactory());
Index: /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/ExtractPointAction.java
===================================================================
--- /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/ExtractPointAction.java	(revision 29768)
+++ /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/ExtractPointAction.java	(revision 29769)
@@ -2,5 +2,4 @@
 package org.openstreetmap.josm.plugins.utilsplugin2.actions;
 
-import java.awt.MouseInfo;
 import java.awt.Point;
 import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
Index: /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/PasteRelationsAction.java
===================================================================
--- /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/PasteRelationsAction.java	(revision 29768)
+++ /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/PasteRelationsAction.java	(revision 29769)
@@ -24,4 +24,5 @@
     }
 
+    @Override
     public void actionPerformed( ActionEvent e ) {
         Collection<OsmPrimitive> selection = getCurrentDataSet().getSelected();
Index: /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/SplitOnIntersectionsAction.java
===================================================================
--- /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/SplitOnIntersectionsAction.java	(revision 29768)
+++ /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/SplitOnIntersectionsAction.java	(revision 29769)
@@ -30,4 +30,5 @@
     }
 
+    @Override
     public void actionPerformed( ActionEvent e ) {
         List<Command> list = new ArrayList<Command>();
Index: /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/SymmetryAction.java
===================================================================
--- /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/SymmetryAction.java	(revision 29768)
+++ /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/SymmetryAction.java	(revision 29769)
@@ -40,4 +40,5 @@
     }
 
+    @Override
     public void actionPerformed(ActionEvent e) {
         Collection<OsmPrimitive> sel = getCurrentDataSet().getSelected();
Index: /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/TagBufferAction.java
===================================================================
--- /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/TagBufferAction.java	(revision 29768)
+++ /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/TagBufferAction.java	(revision 29769)
@@ -28,4 +28,5 @@
     }
 
+    @Override
     public void actionPerformed( ActionEvent e ) {
         Collection<OsmPrimitive> selection = getCurrentDataSet().getSelected();
Index: /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/TagSourceAction.java
===================================================================
--- /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/TagSourceAction.java	(revision 29768)
+++ /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/TagSourceAction.java	(revision 29769)
@@ -29,4 +29,5 @@
     }
 
+    @Override
     public void actionPerformed( ActionEvent e ) {
         Collection<OsmPrimitive> selection = getCurrentDataSet().getSelected();
Index: /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/UnGlueRelationAction.java
===================================================================
--- /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/UnGlueRelationAction.java	(revision 29768)
+++ /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/UnGlueRelationAction.java	(revision 29769)
@@ -46,4 +46,5 @@
      * Called when the action is executed.
      */
+    @Override
     public void actionPerformed(ActionEvent e) {
 
Index: /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/customurl/ChooseURLAction.java
===================================================================
--- /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/customurl/ChooseURLAction.java	(revision 29768)
+++ /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/customurl/ChooseURLAction.java	(revision 29769)
@@ -2,9 +2,5 @@
 
 import java.awt.GridBagLayout;
-import java.awt.event.ItemEvent;
 import java.util.List;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import javax.swing.JComboBox;
 import javax.swing.JPanel;
 import javax.swing.event.ListSelectionEvent;
@@ -13,6 +9,4 @@
 import org.openstreetmap.josm.Main;
 import java.awt.event.ActionEvent;
-import java.awt.event.ItemListener;
-import java.awt.event.KeyEvent;
 import javax.swing.JCheckBox;
 import javax.swing.JLabel;
@@ -22,5 +16,4 @@
 import javax.swing.event.ListSelectionListener;
 import org.openstreetmap.josm.actions.JosmAction;
-import org.openstreetmap.josm.gui.SelectionManager;
 import static org.openstreetmap.josm.tools.I18n.tr;
 
Index: /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/customurl/OpenPageAction.java
===================================================================
--- /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/customurl/OpenPageAction.java	(revision 29768)
+++ /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/customurl/OpenPageAction.java	(revision 29769)
@@ -40,4 +40,5 @@
     }
 
+    @Override
     public void actionPerformed(ActionEvent e) {
         Collection<OsmPrimitive> sel = getCurrentDataSet().getSelected();
@@ -62,24 +63,24 @@
         try {
         while (m.find()) {
-                key=m.group(1); val=null;                
-                if (key.equals("#id")) {
-                    if (p!=null) val=Long.toString(p.getId()); ;
-                } else if (key.equals("#type")) {
-                    if (p!=null) val = OsmPrimitiveType.from(p).getAPIName(); ;
-                } else if (key.equals("#lat")) {
-                    val = Double.toString(center.lat());
-                } else if (key.equals("#lon")) {
-                    val = Double.toString(center.lon());
+            key=m.group(1); val=null;                
+            if (key.equals("#id")) {
+                if (p!=null) val=Long.toString(p.getId());
+            } else if (key.equals("#type")) {
+                if (p!=null) val = OsmPrimitiveType.from(p).getAPIName();
+            } else if (key.equals("#lat")) {
+                val = Double.toString(center.lat());
+            } else if (key.equals("#lon")) {
+                val = Double.toString(center.lon());
+            }
+            else {
+                if (p!=null) {
+                    val =p.get(key);
+                    if (val!=null) val =URLEncoder.encode(p.get(key), "UTF-8"); else return;
                 }
-                else {
-                    if (p!=null) {
-                        val =p.get(key);
-                        if (val!=null) val =URLEncoder.encode(p.get(key), "UTF-8"); else return;
-                    }
-                }
-                keys[i]=m.group();
-                if  (val!=null) vals[i]=val;
-                else vals[i]="";
-                i++;
+            }
+            keys[i]=m.group();
+            if  (val!=null) vals[i]=val;
+            else vals[i]="";
+            i++;
         }
         } catch (UnsupportedEncodingException ex) {
Index: /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/customurl/UtilsPluginPreferences.java
===================================================================
--- /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/customurl/UtilsPluginPreferences.java	(revision 29768)
+++ /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/customurl/UtilsPluginPreferences.java	(revision 29769)
@@ -48,4 +48,5 @@
         resetButton = new JButton(tr("Reset"));
         resetButton.addActionListener(new ActionListener() {
+            @Override
             public void actionPerformed(ActionEvent e) {
                 fillRows(URLList.resetURLList());
@@ -55,4 +56,5 @@
         saveButton = new JButton(tr("Save to file"));
         saveButton.addActionListener(new ActionListener() {
+            @Override
             public void actionPerformed(ActionEvent e) {
                 URLList.saveURLList(readItemsFromTable());
@@ -62,4 +64,5 @@
         loadButton = new JButton(tr("Load from file"));
         loadButton.addActionListener(new ActionListener() {
+            @Override
             public void actionPerformed(ActionEvent e) {
                 fillRows(URLList.loadURLList());
Index: /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/latlon/LatLonAction.java
===================================================================
--- /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/latlon/LatLonAction.java	(revision 29768)
+++ /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/latlon/LatLonAction.java	(revision 29769)
@@ -35,4 +35,5 @@
     }
 
+    @Override
     public void actionPerformed(ActionEvent e) {
         if (!isEnabled())
Index: /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/latlon/LatLonDialog.java
===================================================================
--- /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/latlon/LatLonDialog.java	(revision 29768)
+++ /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/latlon/LatLonDialog.java	(revision 29769)
@@ -7,9 +7,6 @@
 import java.awt.Component;
 import java.awt.GridBagLayout;
-import java.awt.event.ActionEvent;
 import java.awt.event.FocusEvent;
 import java.awt.event.FocusListener;
-import java.awt.event.WindowAdapter;
-import java.awt.event.WindowEvent;
 import java.text.NumberFormat;
 import java.text.ParsePosition;
@@ -20,5 +17,4 @@
 import java.util.regex.Pattern;
 
-import javax.swing.AbstractAction;
 import javax.swing.BorderFactory;
 import javax.swing.JLabel;
@@ -27,5 +23,4 @@
 import javax.swing.JTabbedPane;
 
-import javax.swing.text.Document;
 import javax.swing.JTextArea;
 import javax.swing.JScrollPane;
@@ -45,5 +40,4 @@
 import org.openstreetmap.josm.gui.widgets.HtmlPanel;
 import org.openstreetmap.josm.tools.GBC;
-import org.openstreetmap.josm.tools.ImageProvider;
 import org.openstreetmap.josm.tools.WindowGeometry;
 
@@ -288,13 +282,13 @@
 
     class LatLonInputVerifier implements DocumentListener {
-        public void changedUpdate(DocumentEvent e) {
+        @Override public void changedUpdate(DocumentEvent e) {
             parseLatLonUserInput();
         }
 
-        public void insertUpdate(DocumentEvent e) {
+        @Override public void insertUpdate(DocumentEvent e) {
             parseLatLonUserInput();
         }
 
-        public void removeUpdate(DocumentEvent e) {
+        @Override public void removeUpdate(DocumentEvent e) {
             parseLatLonUserInput();
         }
@@ -302,4 +296,5 @@
 
     static class TextFieldFocusHandler implements FocusListener {
+        @Override 
         public void focusGained(FocusEvent e) {
             Component c = e.getComponent();
@@ -309,4 +304,5 @@
             }
         }
+        @Override 
         public void focusLost(FocusEvent e) {}
     }
@@ -448,11 +444,11 @@
 
     private class CoordinateListener implements DocumentListener {
-        public void changedUpdate(DocumentEvent e) {
+        @Override public void changedUpdate(DocumentEvent e) {
             //not fired
         }
-        public void insertUpdate(DocumentEvent e) {
+        @Override public void insertUpdate(DocumentEvent e) {
             updateButtons();
         }
-        public void removeUpdate(DocumentEvent e) {
+        @Override public void removeUpdate(DocumentEvent e) {
             updateButtons();
         }
Index: /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/AdjacentNodesAction.java
===================================================================
--- /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/AdjacentNodesAction.java	(revision 29768)
+++ /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/AdjacentNodesAction.java	(revision 29769)
@@ -31,4 +31,5 @@
     private  Set<Way> activeWays = new HashSet<Way>();
 
+    @Override
     public void actionPerformed(ActionEvent e) {
         Collection<OsmPrimitive> selection = getCurrentDataSet().getSelected();
Index: /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/AdjacentWaysAction.java
===================================================================
--- /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/AdjacentWaysAction.java	(revision 29768)
+++ /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/AdjacentWaysAction.java	(revision 29769)
@@ -30,4 +30,5 @@
     }
 
+    @Override
     public void actionPerformed(ActionEvent e) {
         Collection<OsmPrimitive> selection = getCurrentDataSet().getSelected();
Index: /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/ConnectedWaysAction.java
===================================================================
--- /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/ConnectedWaysAction.java	(revision 29768)
+++ /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/ConnectedWaysAction.java	(revision 29769)
@@ -27,4 +27,5 @@
     }
 
+    @Override
     public void actionPerformed(ActionEvent e) {
         Collection<OsmPrimitive> selection = getCurrentDataSet().getSelected();
Index: /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/IntersectedWaysAction.java
===================================================================
--- /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/IntersectedWaysAction.java	(revision 29768)
+++ /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/IntersectedWaysAction.java	(revision 29769)
@@ -29,4 +29,5 @@
     }
 
+    @Override
     public void actionPerformed(ActionEvent e) {
         Set<Way> selectedWays = OsmPrimitive.getFilteredSet(getCurrentDataSet().getSelected(), Way.class);
Index: /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/IntersectedWaysRecursiveAction.java
===================================================================
--- /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/IntersectedWaysRecursiveAction.java	(revision 29768)
+++ /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/IntersectedWaysRecursiveAction.java	(revision 29769)
@@ -30,6 +30,6 @@
     }
 
+    @Override
     public void actionPerformed(ActionEvent e) {
-        Collection<OsmPrimitive> selection = getCurrentDataSet().getSelected();
         
         Set<Way> selectedWays = OsmPrimitive.getFilteredSet(getCurrentDataSet().getSelected(), Way.class);
@@ -41,5 +41,4 @@
                     selectedWays, newWays);
             getCurrentDataSet().addSelected(newWays);
-            return;
         } else {
              JOptionPane.showMessageDialog(Main.parent,
Index: /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/MiddleNodesAction.java
===================================================================
--- /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/MiddleNodesAction.java	(revision 29768)
+++ /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/MiddleNodesAction.java	(revision 29769)
@@ -33,10 +33,9 @@
     private  Set<Way> activeWays = new HashSet<Way>();
 
+    @Override
     public void actionPerformed(ActionEvent e) {
         Collection<OsmPrimitive> selection = getCurrentDataSet().getSelected();
         Set<Node> selectedNodes = OsmPrimitive.getFilteredSet(selection, Node.class);
 
-        Set<Way> selectedWays = OsmPrimitive.getFilteredSet(getCurrentDataSet().getSelected(), Way.class);
-        
         // if no 2 nodes and no ways are selected, do nothing
         if (selectedNodes.size() != 2) {
Index: /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/NodeWayUtils.java
===================================================================
--- /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/NodeWayUtils.java	(revision 29768)
+++ /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/NodeWayUtils.java	(revision 29769)
@@ -181,10 +181,9 @@
 
     public static void addWaysIntersectingWaysRecursively
-            (Collection<Way> allWays, Collection<Way> initWays, Set<Way> newWays)
-    {
+            (Collection<Way> allWays, Collection<Way> initWays, Set<Way> newWays) {
             Set<Way> foundWays = new HashSet<Way>();
             foundWays.addAll(initWays);
             newWays.addAll(initWays);
-            Set<Way> newFoundWays = new HashSet<Way>();
+            Set<Way> newFoundWays;
 
             int level=0,c;
@@ -207,5 +206,4 @@
                  }
             } while ( c >0 && level < maxLevel );
-            return;
     }
 
@@ -234,5 +232,4 @@
             } while ( c >0 && level < maxLevel );
            // System.out.println("time = "+(System.currentTimeMillis()-t)+" ways = "+newWays.size());
-            return;
     }
 
@@ -269,5 +266,5 @@
             }
         }
-        if (newNodes.size()==0) {
+        if (newNodes.isEmpty()) {
                 JOptionPane.showMessageDialog(Main.parent,
                     tr("Please select two nodes connected by way!"),
Index: /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectAllInsideAction.java
===================================================================
--- /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectAllInsideAction.java	(revision 29768)
+++ /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectAllInsideAction.java	(revision 29769)
@@ -8,6 +8,4 @@
 import java.awt.event.KeyEvent;
 import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
 
 import javax.swing.JOptionPane;
Index: /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectBoundaryAction.java
===================================================================
--- /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectBoundaryAction.java	(revision 29768)
+++ /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectBoundaryAction.java	(revision 29769)
@@ -19,5 +19,4 @@
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.JosmAction;
-import org.openstreetmap.josm.data.coor.EastNorth;
 import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
@@ -40,6 +39,7 @@
     }
 
+    @Override
     public void actionPerformed(ActionEvent e) {
-        long t=System.currentTimeMillis();
+        //long t=System.currentTimeMillis();
         Set<Way> selectedWays = OsmPrimitive.getFilteredSet(getCurrentDataSet().getSelected(), Way.class);
         Set<Node> selectedNodes = OsmPrimitive.getFilteredSet(getCurrentDataSet().getSelected(), Node.class);
Index: /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectModNodesAction.java
===================================================================
--- /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectModNodesAction.java	(revision 29768)
+++ /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectModNodesAction.java	(revision 29769)
@@ -32,4 +32,5 @@
     }
 
+    @Override
      public void actionPerformed(ActionEvent e) {
         Collection<OsmPrimitive> selection = getCurrentDataSet().getSelected();
Index: /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectModWaysAction.java
===================================================================
--- /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectModWaysAction.java	(revision 29768)
+++ /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectModWaysAction.java	(revision 29769)
@@ -32,4 +32,5 @@
     }
 
+    @Override
     public void actionPerformed(ActionEvent e) {
         Collection<OsmPrimitive> selection = getCurrentDataSet().getSelected();
Index: /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectWayNodesAction.java
===================================================================
--- /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectWayNodesAction.java	(revision 29768)
+++ /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectWayNodesAction.java	(revision 29769)
@@ -40,4 +40,5 @@
      * This method does some checking on the selection and calls the matching selectWayNodes method.
      */
+    @Override
     public void actionPerformed(ActionEvent e) {
         Collection<OsmPrimitive> selection = getCurrentDataSet().getSelected();
Index: /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/UndoSelectionAction.java
===================================================================
--- /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/UndoSelectionAction.java	(revision 29768)
+++ /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/UndoSelectionAction.java	(revision 29769)
@@ -10,7 +10,5 @@
 import java.util.HashSet;
 import java.util.LinkedList;
-import java.util.List;
 import java.util.Set;
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.JosmAction;
 import org.openstreetmap.josm.data.osm.*;
@@ -34,9 +32,10 @@
     private Collection<OsmPrimitive> lastSel;
     private int index;
+    @Override
     public void actionPerformed(ActionEvent e) {
-        LinkedList<Collection<? extends OsmPrimitive>>history
+        LinkedList<Collection<? extends OsmPrimitive>> history
                     = getCurrentDataSet().getSelectionHistory();
+        if (history==null || history.isEmpty()) return; // empty history
         int num=history.size();
-        if (history==null || num==0) return; // empty history
         
         Collection<OsmPrimitive> selection = getCurrentDataSet().getSelected();
Index: /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/UnselectNodesAction.java
===================================================================
--- /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/UnselectNodesAction.java	(revision 29768)
+++ /applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/UnselectNodesAction.java	(revision 29769)
@@ -28,4 +28,5 @@
     }
 
+    @Override
     public void actionPerformed(ActionEvent e) {
         Collection<OsmPrimitive> selection = getCurrentDataSet().getSelected();
Index: /applications/editors/josm/plugins/videomapping/nbproject/project.xml
===================================================================
--- /applications/editors/josm/plugins/videomapping/nbproject/project.xml	(revision 29769)
+++ /applications/editors/josm/plugins/videomapping/nbproject/project.xml	(revision 29769)
@@ -0,0 +1,67 @@
+<?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>videomapping</name>
+        </general-data>
+        <general-data xmlns="http://www.netbeans.org/ns/freeform-project/2">
+            <!-- Не используйте диалоговое окно свойств проекта при редактировании данного файла вручную. -->
+            <name>videomapping</name>
+            <properties/>
+            <folders>
+                <source-folder>
+                    <label>videomapping</label>
+                    <location>.</location>
+                    <encoding>UTF-8</encoding>
+                </source-folder>
+                <source-folder>
+                    <label>src</label>
+                    <type>java</type>
+                    <location>src</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>
+            <subprojects/>
+        </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;lib/jna-3.4.0.jar;lib/platform-3.4.0.jar;lib/vlcj-2.1.0-javadoc.jar;lib/vlcj-2.1.0-sources.jar;lib/vlcj-2.1.0.jar</classpath>
+                <source-level>1.6</source-level>
+            </compilation-unit>
+        </java-data>
+    </configuration>
+</project>
Index: /applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/VideoPlugin.java
===================================================================
--- /applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/VideoPlugin.java	(revision 29768)
+++ /applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/VideoPlugin.java	(revision 29769)
@@ -48,7 +48,7 @@
 //Here we manage properties and start the other classes
 public class VideoPlugin extends Plugin implements LayerChangeListener{
-	private JMenu VMenu,VDeinterlacer;
-	private JosmAction VAdd,/*VRemove,*/VStart,Vbackward,Vforward,VJump,Vfaster,Vslower,Vloop;
-	private JRadioButtonMenuItem VIntBob,VIntNone,VIntLinear;
+    private JMenu VMenu,VDeinterlacer;
+    private JosmAction VAdd,/*VRemove,*/VStart,Vbackward,Vforward,VJump,Vfaster,Vslower,Vloop;
+    private JRadioButtonMenuItem VIntBob,VIntNone,VIntLinear;
     private JCheckBoxMenuItem VCenterIcon,VSubTitles;
     private JMenuItem VJumpLength,VLoopLength;
@@ -61,35 +61,36 @@
     private Integer jumpLength,loopLength;
     private String mostRecentFolder;
-	private GpxLayer gpsLayer;
-	private VideoPositionLayer videoPositionLayer;
-	private GPSVideoPlayer gpsVideoPlayer;
-	
-	public static String VLC_VERSION = "2.0.x";
-
-	public VideoPlugin(PluginInformation info) {
-		super(info);
-		VideoEngine.setupPlayer();
-		MapView.addLayerChangeListener(this);				
-		createMenusAndShortCuts();
-		enableVideoControlMenus(false);
-		setDefaults();
-		loadProperties();
-	}
-
-	private void createMenusAndShortCuts() {
-		VMenu = Main.main.menu.addMenu(marktr("Video"), KeyEvent.VK_D, Main.main.menu.defaultMenuPos,ht("/Plugin/Videomapping"));
-		VMenu.setEnabled(false);
-		VAdd= new JosmAction(tr("Import Video"),"videomapping",tr("Sync a video against this GPS track"),null,false) {
-            public void actionPerformed(ActionEvent arg0) {                 
+    private GpxLayer gpsLayer;
+    private VideoPositionLayer videoPositionLayer;
+    private GPSVideoPlayer gpsVideoPlayer;
+
+    public static String VLC_VERSION = "2.0.x";
+
+    public VideoPlugin(PluginInformation info) {
+        super(info);
+        VideoEngine.setupPlayer();
+        MapView.addLayerChangeListener(this);				
+        createMenusAndShortCuts();
+        enableVideoControlMenus(false);
+        setDefaults();
+        loadProperties();
+    }
+
+    private void createMenusAndShortCuts() {
+        boolean oldMenu = org.openstreetmap.josm.data.Version.getInstance().getVersion() < 6082;
+        VMenu = Main.main.menu.addMenu(marktr("Video"), oldMenu?KeyEvent.VK_D: KeyEvent.VK_Q, Main.main.menu.defaultMenuPos,ht("/Plugin/Videomapping"));
+        VMenu.setEnabled(false);
+        VAdd= new JosmAction(tr("Import Video"),"videomapping",tr("Sync a video against this GPS track"),null,false) {
+            @Override public void actionPerformed(ActionEvent arg0) {                 
                     importVideoFile();
                 }
         };
         /*VRemove=*/ new JosmAction(tr("Remove Video"),"videomapping",tr("removes current video from layer"),null,false) {
-            public void actionPerformed(ActionEvent arg0) {
+            @Override public void actionPerformed(ActionEvent arg0) {
             }
         };
         VStart = new JosmAction(tr("Play/Pause"), "audio-playpause", tr("starts/pauses video playback"),
                 Shortcut.registerShortcut("videomapping:startstop",tr("Video: {0}", tr("Play/Pause")),KeyEvent.VK_NUMPAD5, Shortcut.DIRECT), false, "vm_play_pause",false) {            
-            public void actionPerformed(ActionEvent e) {
+            @Override public void actionPerformed(ActionEvent e) {
                 if (gpsVideoPlayer != null) {
                     gpsVideoPlayer.pause();
@@ -99,5 +100,5 @@
         Vbackward = new JosmAction(tr("Backward"), "audio-prev", tr("jumps n sec back"),
                 Shortcut.registerShortcut("videomapping:backward",tr("Video: {0}", tr("Backward")),KeyEvent.VK_NUMPAD4, Shortcut.DIRECT), false, "vm_prev",false) {
-            public void actionPerformed(ActionEvent e) {
+            @Override public void actionPerformed(ActionEvent e) {
                 if (gpsVideoPlayer != null) {
                     gpsVideoPlayer.backward();
@@ -107,5 +108,5 @@
         Vforward= new JosmAction(tr("Forward"), "audio-next", tr("jumps n sec forward"),
                 Shortcut.registerShortcut("videomapping:forward",tr("Video: {0}", tr("Forward")),KeyEvent.VK_NUMPAD6, Shortcut.DIRECT), false, "vm_next",false) {
-            public void actionPerformed(ActionEvent e) {
+            @Override public void actionPerformed(ActionEvent e) {
                 if (gpsVideoPlayer != null) {
                     gpsVideoPlayer.forward();
@@ -116,5 +117,5 @@
                 Shortcut.registerShortcut("videomapping:faster",tr("Video: {0}", tr("Faster")),KeyEvent.VK_NUMPAD8, Shortcut.DIRECT), false, "vm_faster",false) {
             
-            public void actionPerformed(ActionEvent e) {
+            @Override public void actionPerformed(ActionEvent e) {
                 if (gpsVideoPlayer != null) {
                     gpsVideoPlayer.setSpeed(gpsVideoPlayer.getSpeed()+20);
@@ -125,5 +126,5 @@
                 Shortcut.registerShortcut("videomapping:slower",tr("Video: {0}", tr("Slower")),KeyEvent.VK_NUMPAD2, Shortcut.DIRECT), false, "vm_slower",false) {
             
-            public void actionPerformed(ActionEvent e) {
+            @Override public void actionPerformed(ActionEvent e) {
                 if (gpsVideoPlayer != null) {
                     gpsVideoPlayer.setSpeed(gpsVideoPlayer.getSpeed()-20);
@@ -132,5 +133,5 @@
         };
         VJump= new JosmAction(tr("Jump To"), "jumpto", tr("jumps to the entered gps time"),null, false) {
-            public void actionPerformed(ActionEvent e) {
+            @Override public void actionPerformed(ActionEvent e) {
             	showJumpTo();
             }
@@ -140,5 +141,5 @@
         Vloop= new JosmAction(tr("Loop"), "loop", tr("loops n sec around current position"),
                 Shortcut.registerShortcut("videomapping:loop",tr("Video: {0}", tr("Loop")),KeyEvent.VK_NUMPAD7, Shortcut.DIRECT), false) {            
-            public void actionPerformed(ActionEvent e) {
+            @Override public void actionPerformed(ActionEvent e) {
                 if (gpsVideoPlayer != null) {
                     gpsVideoPlayer.toggleLooping();
@@ -149,5 +150,5 @@
         //now the options menu
         VCenterIcon = new JCheckBoxMenuItem(new JosmAction(tr("Keep centered"), (String)null, tr("follows the video icon automaticly"),null, false,"vm_keepcentered",false) {            
-            public void actionPerformed(ActionEvent e) {
+            @Override public void actionPerformed(ActionEvent e) {
                 if (videoPositionLayer != null) {
                     videoPositionLayer.setAutoCenter(VCenterIcon.isSelected());
@@ -157,5 +158,5 @@
         
         VSubTitles = new JCheckBoxMenuItem(new JosmAction(tr("Subtitles"), (String)null, tr("Show subtitles in video"),null, false,"vm_subtitles",false) {
-            public void actionPerformed(ActionEvent e) {
+            @Override public void actionPerformed(ActionEvent e) {
                 if (gpsVideoPlayer != null) {
                     gpsVideoPlayer.setSubtitles(VSubTitles.isSelected());
@@ -165,5 +166,5 @@
         
         VJumpLength = new JMenuItem(new JosmAction(tr("Jump length"), (String)null, tr("Set the length of a jump"),null, false,"vm_jumplen",false) {            
-            public void actionPerformed(ActionEvent e) {
+            @Override public void actionPerformed(ActionEvent e) {
             	Object[] possibilities = {"200", "500", "1000", "2000", "10000"};
                 String s = (String)JOptionPane.showInputDialog(Main.parent,tr("Jump in video for x ms"),tr("Jump length"),JOptionPane.QUESTION_MESSAGE,null,possibilities,jumpLength);
@@ -174,5 +175,5 @@
         
         VLoopLength = new JMenuItem(new JosmAction(tr("Loop length"), (String)null, tr("Set the length around a looppoint"),null, false,"vm_looplen",false) {            
-            public void actionPerformed(ActionEvent e) {
+            @Override public void actionPerformed(ActionEvent e) {
             	Object[] possibilities = {"500", "1000", "3000", "5000", "10000"};
                 String s = (String)JOptionPane.showInputDialog(Main.parent,tr("Jump in video for x ms"),tr("Loop length"),JOptionPane.QUESTION_MESSAGE,null,possibilities,loopLength);
@@ -184,5 +185,5 @@
         VDeinterlacer= new JMenu("Deinterlacer");
         VIntNone= new JRadioButtonMenuItem(new JosmAction(tr("none"), (String)null, tr("no deinterlacing"),null, false,"vm_deinterlacer",false) {            
-            public void actionPerformed(ActionEvent e) {
+            @Override public void actionPerformed(ActionEvent e) {
                 if (gpsVideoPlayer != null) {
                     gpsVideoPlayer.setDeinterlacer(null);
@@ -191,5 +192,5 @@
         });
         VIntBob= new JRadioButtonMenuItem(new JosmAction("bob", (String)null, tr("deinterlacing using line doubling"),null, false,"vm_bobdeinterlace",false) {
-            public void actionPerformed(ActionEvent e) {
+            @Override public void actionPerformed(ActionEvent e) {
                 if (gpsVideoPlayer != null) {
                     gpsVideoPlayer.setDeinterlacer(DeinterlaceMode.BOB);
@@ -198,5 +199,5 @@
         });
         VIntLinear= new JRadioButtonMenuItem(new JosmAction("linear", (String)null, tr("deinterlacing using linear interpolation"),null, false,"vm_lineardeinterlace",false) {
-            public void actionPerformed(ActionEvent e) {
+            @Override public void actionPerformed(ActionEvent e) {
                 if (gpsVideoPlayer != null) {
                     gpsVideoPlayer.setDeinterlacer(DeinterlaceMode.LINEAR);
@@ -223,32 +224,31 @@
     }
 
-	protected void importVideoFile() {
-		JFileChooser fc = new JFileChooser(mostRecentFolder);
+    protected void importVideoFile() {
+        JFileChooser fc = new JFileChooser(mostRecentFolder);
         fc.setSelectedFile(new File(mostRecentFolder));
         if (fc.showOpenDialog(Main.parent) != JFileChooser.CANCEL_OPTION) {
-        	mostRecentFolder=fc.getSelectedFile().getAbsolutePath();
-        	saveProperties();
-        	if (videoPositionLayer == null && gpsLayer != null) {
-        		videoPositionLayer = new VideoPositionLayer(gpsLayer);
-            	gpsVideoPlayer = new GPSVideoPlayer(new SimpleDateFormat("hh:mm:ss") ,videoPositionLayer);
-            	gpsVideoPlayer.setJumpLength(jumpLength);
-            	gpsVideoPlayer.setLoopLength(loopLength);
-            	enableVideoControlMenus(true);
-        	}
-        	if (gpsVideoPlayer != null && gpsVideoPlayer.isCorrectlyInitiliazed()) {
-        	    gpsVideoPlayer.addVideo(fc.getSelectedFile());
-        	} else {
+            mostRecentFolder=fc.getSelectedFile().getAbsolutePath();
+            saveProperties();
+            if (videoPositionLayer == null && gpsLayer != null) {
+                videoPositionLayer = new VideoPositionLayer(gpsLayer);
+                gpsVideoPlayer = new GPSVideoPlayer(new SimpleDateFormat("hh:mm:ss") ,videoPositionLayer);
+                gpsVideoPlayer.setJumpLength(jumpLength);
+                gpsVideoPlayer.setLoopLength(loopLength);
+                enableVideoControlMenus(true);
+            }
+            if (gpsVideoPlayer != null && gpsVideoPlayer.isCorrectlyInitiliazed()) {
+                gpsVideoPlayer.addVideo(fc.getSelectedFile());
+            } else {
                 JOptionPane.showMessageDialog(Main.parent, 
-                        tr("VLC library is not correctly initialized."+
-                                " Please check that VLC {0} is correctly installed on your system."+
-                                " Its architecture (32/64 bits) must also be the same as the JRE that runs JOSM.", VLC_VERSION),
-                        tr("Error"), JOptionPane.ERROR_MESSAGE
-                        );
-        	}
+                    tr("VLC library is not correctly initialized."+
+                            " Please check that VLC {0} is correctly installed on your system."+
+                            " Its architecture (32/64 bits) must also be the same as the JRE that runs JOSM.", VLC_VERSION),
+                    tr("Error"), JOptionPane.ERROR_MESSAGE);
+            }
         }		
-	}
-
-	private void enableVideoControlMenus(boolean b) {
-		VStart.setEnabled(b);
+    }
+
+    private void enableVideoControlMenus(boolean b) {
+        VStart.setEnabled(b);
         Vbackward.setEnabled(b);
         Vforward.setEnabled(b);
@@ -257,15 +257,15 @@
         Vslower.setEnabled(b);
         VJump.setEnabled(b);		
-	}
+    }
 	
-	private void setDefaults() {
-		autoCenter=false;
+    private void setDefaults() {
+        autoCenter=false;
 //		deinterlacer="";
-		jumpLength=1000;
-		loopLength=6000;
-		mostRecentFolder=System.getProperty("user.home");		
-	}
+        jumpLength=1000;
+        loopLength=6000;
+        mostRecentFolder=System.getProperty("user.home");		
+    }
 	
-	private void loadProperties() {
+    private void loadProperties() {
         String temp;        
         temp=Main.pref.get(PROP_AUTOCENTER);
@@ -283,5 +283,5 @@
     }
 	
-	private void saveProperties(){
+    private void saveProperties(){
         Main.pref.put(PROP_AUTOCENTER, autoCenter);
         Main.pref.put(PROP_JUMPLENGTH, jumpLength.toString());
@@ -290,48 +290,48 @@
     }
 	
-	private void showJumpTo()
-	{
-    	try {
-	    	JOptionPane d=new JOptionPane(tr("Jump to"), JOptionPane.QUESTION_MESSAGE, JOptionPane.OK_CANCEL_OPTION);	    	
-	    	SimpleDateFormat gpsTimeFormat= new SimpleDateFormat("HH:mm:ss");
-	    	String timerange=gpsTimeFormat.format(videoPositionLayer.getFirstWayPoint().getTime())+" - ";
-	    	timerange=timerange+gpsTimeFormat.format(videoPositionLayer.getLastWayPoint().getTime());
-	    	d.add(new JLabel(timerange)); //TODO for some reason this doesn't work -> use dialog
-	    	final JFormattedTextField inp = new JFormattedTextField(new MaskFormatter("##:##:##"));
-	    	inp.setText(gpsTimeFormat.format( videoPositionLayer.getGPSDate()));
-	    	inp.setInputVerifier(new InputVerifier() {					
-				@Override
-				public boolean verify(JComponent input) {
-					return false;
-				}
-			});
-	    	//hack to set the focus
-	    	SwingUtilities.invokeLater(new Runnable() {
-	            public void run() {
-	            	inp.requestFocus();
-	            	inp.setCaretPosition(0);
-	            }
-	        });
-	    	if (JOptionPane.showConfirmDialog(Main.panel,inp, tr("Jump to GPS time"),JOptionPane.OK_CANCEL_OPTION) == JOptionPane.OK_OPTION)
-	    	{
-	    		//add the day to the time
-	    		Date t = gpsTimeFormat.parse(inp.getText());	    		
-	    		Calendar time = Calendar.getInstance();
-	    		Calendar date = Calendar.getInstance();
-	    		time.setTime(t);
-	    		date.setTime(videoPositionLayer.getFirstWayPoint().getTime());
-	    		time.set(date.get(Calendar.YEAR), date.get(Calendar.MONTH), date.get(Calendar.DATE));
-	            if (t!=null)
-	            {
-	            	videoPositionLayer.jump(time.getTime());
-	            }                       
-	    	}
+    private void showJumpTo() {
+        try {
+            JOptionPane d=new JOptionPane(tr("Jump to"), JOptionPane.QUESTION_MESSAGE, JOptionPane.OK_CANCEL_OPTION);	    	
+            SimpleDateFormat gpsTimeFormat= new SimpleDateFormat("HH:mm:ss");
+            String timerange=gpsTimeFormat.format(videoPositionLayer.getFirstWayPoint().getTime())+" - ";
+            timerange=timerange+gpsTimeFormat.format(videoPositionLayer.getLastWayPoint().getTime());
+            d.add(new JLabel(timerange)); //TODO for some reason this doesn't work -> use dialog
+            final JFormattedTextField inp = new JFormattedTextField(new MaskFormatter("##:##:##"));
+            inp.setText(gpsTimeFormat.format( videoPositionLayer.getGPSDate()));
+            inp.setInputVerifier(new InputVerifier() {					
+                    @Override
+                    public boolean verify(JComponent input) {
+                        return false;
+                    }
+                });
+            //hack to set the focus
+            SwingUtilities.invokeLater(new Runnable() {
+                @Override
+                public void run() {
+                    inp.requestFocus();
+                    inp.setCaretPosition(0);
+                }
+            });
+            if (JOptionPane.showConfirmDialog(Main.panel,inp, tr("Jump to GPS time"),JOptionPane.OK_CANCEL_OPTION) == JOptionPane.OK_OPTION)
+            {
+                    //add the day to the time
+                    Date t = gpsTimeFormat.parse(inp.getText());	    		
+                    Calendar time = Calendar.getInstance();
+                    Calendar date = Calendar.getInstance();
+                    time.setTime(t);
+                    date.setTime(videoPositionLayer.getFirstWayPoint().getTime());
+                    time.set(date.get(Calendar.YEAR), date.get(Calendar.MONTH), date.get(Calendar.DATE));
+                if (t!=null)
+                {
+                    videoPositionLayer.jump(time.getTime());
+                }                       
+            }
     	} catch (ParseException e1) {
-                e1.printStackTrace();
+            e1.printStackTrace();
         }
-	}
-	
-
-	public void activeLayerChange(Layer oldLayer, Layer newLayer) {
+    }
+
+    @Override
+    public void activeLayerChange(Layer oldLayer, Layer newLayer) {
         VMenu.setEnabled(true);
         if (newLayer instanceof GpxLayer)
@@ -343,14 +343,14 @@
     }
 
-	public void layerAdded(Layer arg0) {
-		activeLayerChange(null,arg0);
-		
-	}
-
-	public void layerRemoved(Layer arg0) {
-		if(arg0 instanceof VideoPositionLayer)
-			enableVideoControlMenus(false);
-		activeLayerChange(null,arg0);
-		
-	}
+    @Override
+    public void layerAdded(Layer arg0) {
+        activeLayerChange(null,arg0);
+    }
+
+    @Override
+    public void layerRemoved(Layer arg0) {
+        if(arg0 instanceof VideoPositionLayer)
+                enableVideoControlMenus(false);
+        activeLayerChange(null,arg0);
+    }
   }
Index: /applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/GPSVideoPlayer.java
===================================================================
--- /applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/GPSVideoPlayer.java	(revision 29768)
+++ /applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/GPSVideoPlayer.java	(revision 29769)
@@ -42,4 +42,5 @@
 		syncButton.setBackground(Color.RED);		
 		syncButton.addActionListener(new ActionListener() {
+            @Override
             public void actionPerformed(ActionEvent e) {
             	resync(e);
Index: /applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/VideoEngine.java
===================================================================
--- /applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/VideoEngine.java	(revision 29768)
+++ /applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/VideoEngine.java	(revision 29769)
@@ -319,7 +319,6 @@
 	}
 
-	public void backward(MediaPlayer arg0) {
-		
-	}
+        @Override
+	public void backward(MediaPlayer arg0) { }
 /*
 	public void buffering(MediaPlayer arg0) {
@@ -327,19 +326,15 @@
 	}
 */
-	public void error(MediaPlayer arg0) {
-		
-	}
-
-	public void finished(MediaPlayer arg0) {
-		
-	}
-
-	public void forward(MediaPlayer arg0) {
-		
-	}
-
-	public void lengthChanged(MediaPlayer arg0, long arg1) {
-		
-	}
+        @Override
+	public void error(MediaPlayer arg0) { }
+
+        @Override
+	public void finished(MediaPlayer arg0) { }
+
+        @Override
+	public void forward(MediaPlayer arg0) { }
+
+        @Override
+	public void lengthChanged(MediaPlayer arg0, long arg1) { }
 /*
 	public void mediaChanged(MediaPlayer arg0) {
@@ -353,43 +348,33 @@
 	}
 */
-	public void opening(MediaPlayer arg0) {
-		
-	}
-
-	public void pausableChanged(MediaPlayer arg0, int arg1) {
-		
-	}
-
-	public void paused(MediaPlayer arg0) {
-			
-	}
-
-	public void playing(MediaPlayer arg0) {
-		
-	}
-
-	public void positionChanged(MediaPlayer arg0, float arg1) {
-		
-	}
-
-	public void seekableChanged(MediaPlayer arg0, int arg1) {
-		
-	}
-
-	public void snapshotTaken(MediaPlayer arg0, String arg1) {
-		
-	}
-
-	public void stopped(MediaPlayer arg0) {
-		
-	}
-
-	public void timeChanged(MediaPlayer arg0, long arg1) {
-		
-	}
-
-	public void titleChanged(MediaPlayer arg0, int arg1) {
-		
-	}
+        @Override
+	public void opening(MediaPlayer arg0) {	}
+
+        @Override
+	public void pausableChanged(MediaPlayer arg0, int arg1) { }
+
+        @Override
+	public void paused(MediaPlayer arg0) { }
+
+        @Override
+	public void playing(MediaPlayer arg0) { }
+
+        @Override
+	public void positionChanged(MediaPlayer arg0, float arg1) { }
+
+        @Override
+	public void seekableChanged(MediaPlayer arg0, int arg1) { }
+
+        @Override
+	public void snapshotTaken(MediaPlayer arg0, String arg1) { }
+
+        @Override
+	public void stopped(MediaPlayer arg0) { }
+
+        @Override
+	public void timeChanged(MediaPlayer arg0, long arg1) { }
+
+        @Override
+	public void titleChanged(MediaPlayer arg0, int arg1) { }
 
 	public boolean isNoVideoPlaying() {
Index: /applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/VideoPlayer.java
===================================================================
--- /applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/VideoPlayer.java	(revision 29768)
+++ /applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/VideoPlayer.java	(revision 29769)
@@ -30,5 +30,6 @@
 import uk.co.caprica.vlcj.player.DeinterlaceMode;
 
-//basic UI of a videoplayer for multiple videos incl. notifications
+/** basic UI of a videoplayer for multiple videos incl. notifications
+ */
 public class VideoPlayer extends JFrame implements WindowListener, VideosObserver, VideoPlayerObserver {
 	private static final int notificationIntervall = 500;
@@ -205,5 +206,5 @@
         
         play.addActionListener(new ActionListener() {            
-            public void actionPerformed(ActionEvent arg0) {
+            @Override public void actionPerformed(ActionEvent arg0) {
             pause();                
             }
@@ -212,5 +213,5 @@
         back.addActionListener(new ActionListener() {
             
-            public void actionPerformed(ActionEvent arg0) {
+            @Override public void actionPerformed(ActionEvent arg0) {
                 backward();
             }
@@ -219,5 +220,5 @@
         forward.addActionListener(new ActionListener() {
             
-            public void actionPerformed(ActionEvent arg0) {
+            @Override public void actionPerformed(ActionEvent arg0) {
                 forward();
             }
@@ -226,5 +227,5 @@
         loop.addActionListener(new ActionListener() {
 
-            public void actionPerformed(ActionEvent arg0) {
+            @Override public void actionPerformed(ActionEvent arg0) {
                 toggleLooping();
             }
@@ -233,5 +234,5 @@
         mute.addActionListener(new ActionListener() {
 
-            public void actionPerformed(ActionEvent arg0) {
+            @Override public void actionPerformed(ActionEvent arg0) {
                 mute();
             }
@@ -239,4 +240,5 @@
         
         timeline.addChangeListener(new ChangeListener() {
+            @Override
             public void stateChanged(ChangeEvent e) {
         		//skip events, fired by this sliede, one cycle ago            	
@@ -252,4 +254,5 @@
         
         speed.addChangeListener(new ChangeListener() {            
+            @Override
             public void stateChanged(ChangeEvent arg0) {            	            
             	if(!speed.getValueIsAdjusting())
@@ -311,58 +314,50 @@
 	}
 
-	public void windowActivated(WindowEvent arg0) {
-		// TODO Auto-generated method stub
-		
-	}
-
-	public void windowClosed(WindowEvent arg0) {
-		
-	}
-
+        @Override
+	public void windowActivated(WindowEvent arg0) { }
+
+        @Override
+	public void windowClosed(WindowEvent arg0) { }
+
+        @Override
 	public void windowClosing(WindowEvent arg0) {	
 		videoengine.unload();
 	}
 
-	public void windowDeactivated(WindowEvent arg0) {
-		// TODO Auto-generated method stub
-		
-	}
-
-	public void windowDeiconified(WindowEvent arg0) {
-		// TODO Auto-generated method stub
-		
-	}
-
-	public void windowIconified(WindowEvent arg0) {
-		// TODO Auto-generated method stub
-		
-	}
-
-	public void windowOpened(WindowEvent arg0) {
-		// TODO Auto-generated method stub
-		
-	}
-
+        @Override
+	public void windowDeactivated(WindowEvent arg0) { }
+
+        @Override
+	public void windowDeiconified(WindowEvent arg0) { }
+
+        @Override
+	public void windowIconified(WindowEvent arg0) { }
+
+        @Override
+	public void windowOpened(WindowEvent arg0) { }
+
+        @Override
 	public void update(VideoObserversEvents event) {
-		switch (event)
-		{		
-			case resizing:
-			{
-				pack();
-				break;
-			}
-			case speeding:
-			{
-				speed.setValue(videoengine.getSpeed());
-				break;
-			}
-			case jumping:
-			{			
-				break;
-			}
-		}		
+            switch (event)
+            {		
+                case resizing:
+                {
+                    pack();
+                    break;
+                }
+                case speeding:
+                {
+                    speed.setValue(videoengine.getSpeed());
+                    break;
+                }
+                case jumping:
+                {			
+                    break;
+                }
+            }		
 	}
 
 	//keep internal controls up to date during playback
+        @Override
 	public void update_plays() {
 		timeline.setValue(videoengine.getPosition());
Index: /applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/VideoPlayerObserver.java
===================================================================
--- /applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/VideoPlayerObserver.java	(revision 29768)
+++ /applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/VideoPlayerObserver.java	(revision 29769)
@@ -1,7 +1,7 @@
 package org.openstreetmap.josm.plugins.videomapping.video;
 
-//update mechanism for GPS position, title bar,...
+/** Update mechanism for GPS position, title bar,...
+ */
 public interface VideoPlayerObserver {
 	public void update_plays();
-
 }
Index: /applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/VideosObserver.java
===================================================================
--- /applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/VideosObserver.java	(revision 29768)
+++ /applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/VideosObserver.java	(revision 29769)
@@ -1,8 +1,7 @@
 package org.openstreetmap.josm.plugins.videomapping.video;
 
-//getting basic control informations per video
+/** Getting basic control informations per video
+ */
 public interface VideosObserver {
-
 	void update(VideoObserversEvents event);
-
 }
