Index: /applications/editors/josm/plugins/turnrestrictions/.checkstyle
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/.checkstyle	(revision 32519)
+++ /applications/editors/josm/plugins/turnrestrictions/.checkstyle	(revision 32519)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false">
+  <local-check-config name="JOSM" location="/JOSM/tools/checkstyle/josm_checks.xml" type="project" description="">
+    <additional-data name="protect-config-file" value="false"/>
+  </local-check-config>
+  <fileset name="all" enabled="true" check-config-name="JOSM" local="true">
+    <file-match-pattern match-pattern="." include-pattern="true"/>
+  </fileset>
+  <filter name="DerivedFiles" enabled="true"/>
+  <filter name="FilesFromPackage" enabled="true">
+    <filter-data value="data"/>
+    <filter-data value="images"/>
+    <filter-data value="styles"/>
+    <filter-data value="resources"/>
+    <filter-data value="scripts"/>
+  </filter>
+</fileset-config>
Index: /applications/editors/josm/plugins/turnrestrictions/.project
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/.project	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/.project	(revision 32519)
@@ -12,4 +12,9 @@
 		</buildCommand>
 		<buildCommand>
+			<name>net.sf.eclipsecs.core.CheckstyleBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
 			<name>org.sonarlint.eclipse.core.sonarlintBuilder</name>
 			<arguments>
@@ -20,4 +25,5 @@
 		<nature>org.eclipse.jdt.groovy.core.groovyNature</nature>
 		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
 	</natures>
 </projectDescription>
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/CreateOrEditTurnRestrictionAction.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/CreateOrEditTurnRestrictionAction.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/CreateOrEditTurnRestrictionAction.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions;
 
@@ -29,9 +30,7 @@
     /**
      * Replies the unique instance of this action
-     *
-     * @return
      */
     public static CreateOrEditTurnRestrictionAction getInstance() {
-        if (instance == null){
+        if (instance == null) {
             instance = new CreateOrEditTurnRestrictionAction();
         }
@@ -44,5 +43,5 @@
             null,
             tr("Create or edit a turn restriction."),
-            Shortcut.registerShortcut("tools:turnrestriction", tr("Tool: {0}","Create or edit a turn restriction."),
+            Shortcut.registerShortcut("tools:turnrestriction", tr("Tool: {0}", "Create or edit a turn restriction."),
                 KeyEvent.VK_2, Shortcut.ALT_SHIFT),
             false
@@ -55,10 +54,10 @@
         if (layer == null) return;
         Collection<Relation> trs = TurnRestrictionSelectionPopupPanel.getTurnRestrictionsParticipatingIn(layer.data.getSelected());
-        if (trs.isEmpty()){
+        if (trs.isEmpty()) {
             // current selection isn't participating in turn restrictions. Launch
             // an editor for a new turn restriction
             //
             Relation tr = new TurnRestrictionBuilder().buildFromSelection(layer);
-            TurnRestrictionEditor editor = new TurnRestrictionEditor(Main.map.mapView,layer,tr);
+            TurnRestrictionEditor editor = new TurnRestrictionEditor(Main.map.mapView, layer, tr);
             TurnRestrictionEditorManager.getInstance().positionOnScreen(editor);
             TurnRestrictionEditorManager.getInstance().register(layer, tr, editor);
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/TurnRestrictionBuilder.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/TurnRestrictionBuilder.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/TurnRestrictionBuilder.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions;
 
@@ -24,33 +25,33 @@
  */
 public class TurnRestrictionBuilder {
-    
+
     /**
      * Replies the angle phi in the polar coordinates (r,phi) representing the first
      * segment of the way {@code w}, where w is moved such that the start node of {@code w} is
-     * in the origin (0,0).
-     *  
-     * @param w the way.  Must not be null. At least two nodes required. 
-     * @return phi in the polar coordinates 
+     * in the origin (0, 0).
+     *
+     * @param w the way.  Must not be null. At least two nodes required.
+     * @return phi in the polar coordinates
      * @throws IllegalArgumentException thrown if w is null
      * @throws IllegalArgumentException thrown if w is too short (at least two nodes required)
      */
-    static public double phi(Way w) throws IllegalArgumentException{
+    public static double phi(Way w) throws IllegalArgumentException {
         return phi(w, false /* not inverse */);
     }
-    
+
     /**
      * <p>Replies the angle phi in the polar coordinates (r,phi) representing the first
      * segment of the way {@code w}, where w is moved such that the start node of {@code w} is
-     * in the origin (0,0).</p>
-     * 
+     * in the origin (0, 0).</p>
+     *
      * <p>If {@code doInvert} is true, computes phi for the way in reversed direction.</p>
-     * 
+     *
      * @param w the way.  Must not be null. At least two nodes required.
-     * @param doInvert if true, computes phi for the reversed way 
-     * @return phi in the polar coordinates 
+     * @param doInvert if true, computes phi for the reversed way
+     * @return phi in the polar coordinates
      * @throws IllegalArgumentException thrown if w is null
      * @throws IllegalArgumentException thrown if w is too short (at least two nodes required)
      */
-    static public double phi(Way w, boolean doInvert) throws IllegalArgumentException {
+    public static double phi(Way w, boolean doInvert) throws IllegalArgumentException {
         CheckParameterUtil.ensureParameterNotNull(w, "w");
         if (w.getNodesCount() < 2) {
@@ -61,14 +62,14 @@
         Node n0 = nodes.get(0);
         Node n1 = nodes.get(1);
-        
+
         double x = n1.getCoor().getX() - n0.getCoor().getX();
         double y = n1.getCoor().getY() - n0.getCoor().getY();
-        return Math.atan2(y, x);      
-    }    
+        return Math.atan2(y, x);
+    }
 
     /**
      * Replies the unique common node of two ways, or null, if either no
      * such node or multiple common nodes exist.
-     * 
+     *
      * @param w1 the first way
      * @param w2 the second way
@@ -76,88 +77,89 @@
      * w1 and w2 don't share exactly one node
      */
-    static public Node getUniqueCommonNode(Way w1, Way w2) throws IllegalArgumentException{
+    public static Node getUniqueCommonNode(Way w1, Way w2) throws IllegalArgumentException {
         Set<Node> w1Nodes = new HashSet<>(w1.getNodes());
         w1Nodes.retainAll(w2.getNodes());
         if (w1Nodes.size() != 1) return null;
         return w1Nodes.iterator().next();
-    }   
-        
+    }
+
     /**
      * Replies true, if {@code n} is the start node of the way {@code w}.
-     * 
+     *
      * @param w the way. Must not be null.
      * @param n the node. Must not be null.
      * @return true, if {@code n} is the start node of the way {@code w}.
      */
-    static public boolean isStartNode(Way w, Node n) {
+    public static boolean isStartNode(Way w, Node n) {
         if (w.getNodesCount() == 0) return false;
         return w.getNode(0).equals(n);
     }
-        
+
     /**
      * Replies true, if {@code n} is the end node of the way {@code w}.
-     * 
+     *
      * @param w the way. Must not be null.
      * @param n the node. Must not be null.
      * @return true, if {@code n} is the end node of the way {@code w}.
      */
-    static public boolean isEndNode(Way w, Node n){
+    public static boolean isEndNode(Way w, Node n) {
         if (w.getNodesCount() == 0) return false;
         return w.getNode(w.getNodesCount()-1).equals(n);
     }
-    
+
     /**
      * Replies true, if {@code n} is a node in the way {@code w} but {@code n}
      * is neither the start nor the end node.
-     * 
-     * @param w the way 
-     * @param n the node 
+     *
+     * @param w the way
+     * @param n the node
      * @return true if {@code n} is an "inner" node
      */
-    static public boolean isInnerNode(Way w, Node n){
+    public static boolean isInnerNode(Way w, Node n) {
         if (!w.getNodes().contains(n)) return false;
         if (isStartNode(w, n)) return false;
         if (isEndNode(w, n)) return false;
-        return true;         
-    }
-    
+        return true;
+    }
+
     /**
      * <p>Replies the angle at which way {@code from} and {@code to} are connected
-     * at exactly one common node.</p> 
-     * 
+     * at exactly one common node.</p>
+     *
      * <p>If the result is positive, the way {@code from} bends to the right, if it
      * is negative, the {@code to} bends to the left.</p>
-     * 
-     * <p>The two ways must not be null and they must be connected at exactly one 
+     *
+     * <p>The two ways must not be null and they must be connected at exactly one
      * common node. They must <strong>not intersect</code> at this node.</p>.
-     * 
+     *
      * @param from the from way
      * @param to the to way
-     * @return the intersection angle 
+     * @return the intersection angle
      * @throws IllegalArgumentException thrown if the two nodes don't have exactly one common
      * node at which they are connected
-     * 
-     */
-    static public double intersectionAngle(Way from, Way to) throws IllegalArgumentException {
+     *
+     */
+    public static double intersectionAngle(Way from, Way to) throws IllegalArgumentException {
         Node via = getUniqueCommonNode(from, to);
         if (via == null)
             throw new IllegalArgumentException("the two ways must share exactly one common node"); // no I18n required
-        if (!isStartNode(from, via) && ! isEndNode(from, via))
+        if (!isStartNode(from, via) && !isEndNode(from, via))
             throw new IllegalArgumentException("via node must be start or end node of from-way"); // no I18n required
-        if (!isStartNode(to, via) && ! isEndNode(to, via))
+        if (!isStartNode(to, via) && !isEndNode(to, via))
             throw new IllegalArgumentException("via node must be start or end node of to-way"); // no I18n required
         double phi1 = phi(from, isStartNode(from, via));
         double phi2 = phi(to, isEndNode(to, via));
         return phi1 - phi2;
-    }   
-        
-    static public enum RelativeWayJoinOrientation {
+    }
+
+    public enum RelativeWayJoinOrientation {
         LEFT,
         RIGHT
     }
+
     /**
      * <p>Determines the orientation in which two ways {@code from} and {@code to}
-     * are connected, with respect to the direction of the way {@code from}.</p> 
-     * 
+     * are connected, with respect to the direction of the way {@code from}.</p>
+     *
      * <p>The following preconditions must be met:
      *   <ul>
@@ -169,5 +171,5 @@
      *   </ul>
      * </p>
-     * 
+     *
      * <p>Here's a typical configuration:</p>
      * <pre>
@@ -178,8 +180,8 @@
      *                     |
      * </pre>
-     * 
+     *
      * <p>Replies null, if the preconditions aren't met and the method fails to
      *  determine the join orientation.</p>
-     * 
+     *
      * @param from the "from"-way
      * @param to the "to"-way
@@ -187,5 +189,5 @@
      * join orientation
      */
-    public static RelativeWayJoinOrientation determineWayJoinOrientation(Way from, Way to){
+    public static RelativeWayJoinOrientation determineWayJoinOrientation(Way from, Way to) {
         Node via = getUniqueCommonNode(from, to);
         if (via == null) return null;
@@ -195,17 +197,17 @@
         if (isClosedAt(from, via)) return null;
         if (isClosedAt(to, via)) return null;
-        
+
         double phi = intersectionAngle(from, to);
-        if (phi >=0 && phi <= Math.PI) {
+        if (phi >= 0 && phi <= Math.PI) {
             return RelativeWayJoinOrientation.RIGHT;
         } else {
             return RelativeWayJoinOrientation.LEFT;
-        } 
-    }
-    
+        }
+    }
+
     /**
      * <p>Selects either of the two ways resulting from the split of a way
      * in the role {@link TurnRestrictionLegRole#TO TO}.</p>
-     * 
+     *
      * <p>This methods operates on three ways for which the following
      * preconditions must be met:
@@ -216,5 +218,5 @@
      * </ul>
      * </p>
-     * 
+     *
      * <p>Here's a typical configuration:</p>
      * <pre>
@@ -225,13 +227,13 @@
      *                     |
      * </pre>
-     * 
+     *
      * <p>Depending on {@code restrictionType}, this method either returns {@code to1}
-     * or {@code to2}. If {@code restrictionType} indicates that our context is a 
+     * or {@code to2}. If {@code restrictionType} indicates that our context is a
      * "left turn", {@code to1} is replied. If our context is a "right turn", {@code to2}
      * is returned.</p>
-     * 
+     *
      * <p>Replies null, if the expected preconditions aren't met or if we can't infer
      * from {@code restrictionType} whether our context is a "left turn" or a "right turn".</p>
-     * 
+     *
      * @param from the from-way
      * @param to1 the first part of the split to-way
@@ -240,5 +242,5 @@
      * @return either {@code to1}, {@code to2}, or {@code null}.
      */
-    static public Way selectToWayAfterSplit(Way from, Way to1, Way to2, TurnRestrictionType restrictionType){
+    public static Way selectToWayAfterSplit(Way from, Way to1, Way to2, TurnRestrictionType restrictionType) {
         if (restrictionType == null) return null;
         Node cn1 = TurnRestrictionBuilder.getUniqueCommonNode(from, to1);
@@ -247,6 +249,6 @@
         if (cn2 == null) return null;
         if (cn1 != cn2) return null;
-        
-        if (! isStartNode(from, cn1) && ! isEndNode(from, cn1)) {
+
+        if (!isStartNode(from, cn1) && !isEndNode(from, cn1)) {
             /*
              * the now split to-way still *intersects* the from-way. We
@@ -255,9 +257,9 @@
             return null;
         }
-        
+
         RelativeWayJoinOrientation o1 = determineWayJoinOrientation(from, to1);
         RelativeWayJoinOrientation o2 = determineWayJoinOrientation(from, to2);
-        
-        switch(restrictionType){
+
+        switch(restrictionType) {
         case NO_LEFT_TURN:
         case ONLY_LEFT_TURN:
@@ -265,5 +267,5 @@
             else if (RelativeWayJoinOrientation.LEFT.equals(o2)) return to2;
             else return null;
-            
+
         case NO_RIGHT_TURN:
         case ONLY_RIGHT_TURN:
@@ -271,5 +273,5 @@
             else if (RelativeWayJoinOrientation.RIGHT.equals(o2)) return to2;
             else return null;
-            
+
         default:
                 /*
@@ -280,12 +282,12 @@
         }
     }
-    
-    public TurnRestrictionBuilder(){
-    }
-    
+
+    public TurnRestrictionBuilder() {
+    }
+
     /**
      * Creates and initializes a new turn restriction based on the primitives
      * currently selected in layer {@code layer}.
-     *  
+     *
      * @param layer the layer. Must not be null.
      * @return the new initialized turn restriction. The turn restriction isn't
@@ -300,8 +302,8 @@
 
     /**
-     * Tries to initialize a No-U-Turn restriction from the primitives in 
+     * Tries to initialize a No-U-Turn restriction from the primitives in
      * <code>primitives</code>. If successful, replies true, otherwise false.
-     * 
-     * @param primitives the primitives 
+     *
+     * @param primitives the primitives
      * @return true, if we can propose a U-turn restriction for the primitives
      * in <code>primitives</code>
@@ -309,10 +311,10 @@
     protected Relation initNoUTurnRestriction(List<OsmPrimitive> primitives) {
         if (primitives.size() != 2) return null;
-                
+
         // we need exactly one node and one way in the selection ...
         List<Node> nodes = OsmPrimitive.getFilteredList(primitives, Node.class);
         List<Way> ways = OsmPrimitive.getFilteredList(primitives, Way.class);
         if (nodes.size() != 1 || ways.size() != 1) return null;
-        
+
         // .. and the node has to be the start or the node of the way
         Way way = ways.get(0);
@@ -320,5 +322,5 @@
         List<Node> wayNodes = way.getNodes();
         if (wayNodes.size() < 2) return null; // shouldn't happen - just in case
-        if (! (wayNodes.get(0).equals(node) ||wayNodes.get(wayNodes.size()-1).equals(node))) return null;
+        if (!(wayNodes.get(0).equals(node) || wayNodes.get(wayNodes.size()-1).equals(node))) return null;
 
         Relation tr = new Relation();
@@ -334,35 +336,34 @@
      * <p>Replies true, if the ways {@code w1} and {@code w2} are connected
      * at the node {@code n}.</p>
-     * 
+     *
      * <p>If {@code w1} and {@code w2} <em>intersect</em> at the node {@code n},
      * this method replies false.</p>
-     * 
+     *
      * @param w1 the first way
-     * @param w2 the second way 
-     * @param n the node 
-     * @return
-     */
-    public static boolean isConnectingNode(Way w1, Way w2, Node n){
+     * @param w2 the second way
+     * @param n the node
+     */
+    public static boolean isConnectingNode(Way w1, Way w2, Node n) {
         if (isStartNode(w1, n)) {
-            return isStartNode(w2, n)  | isEndNode(w2, n);
-        } else if (isEndNode(w1, n)){
-            return isStartNode(w2, n)  | isEndNode(w2, n);
+            return isStartNode(w2, n) | isEndNode(w2, n);
+        } else if (isEndNode(w1, n)) {
+            return isStartNode(w2, n) | isEndNode(w2, n);
         }
         return false;
     }
-    
+
     /**
      * Replies true, if the way {@code w} is closed at the node {@code n}.
-     * 
+     *
      * @param w the way
-     * @param n the node 
+     * @param n the node
      * @return true, if the way {@code w} is closed at the node {@code n}.
      */
-    public static boolean isClosedAt(Way w, Node n){
+    public static boolean isClosedAt(Way w, Node n) {
         List<Node> nodes = w.getNodes();
         nodes.retainAll(Collections.singletonList(n));
         return nodes.size() >= 2;
     }
-   
+
     protected Relation initTurnRestrictionFromTwoWays(List<OsmPrimitive> primitives) {
         Way w1 = null;
@@ -370,5 +371,5 @@
         Node via = null;
         if (primitives.size() == 2) {
-            // if we have exactly two selected primitives, we expect two ways. 
+            // if we have exactly two selected primitives, we expect two ways.
             // See initNoUTurnRestriction() for the case where we have a selected way
             // and a selected node
@@ -378,7 +379,7 @@
             w2 = selWays.get(1);
             via = getUniqueCommonNode(w1, w2);
-        } else if (primitives.size() == 3){
-            // if we have exactly three selected primitives, we need two ways and a 
-            // node, which should be an acceptable via node 
+        } else if (primitives.size() == 3) {
+            // if we have exactly three selected primitives, we need two ways and a
+            // node, which should be an acceptable via node
             List<Way> selWays = OsmPrimitive.getFilteredList(primitives, Way.class);
             List<Node> selNodes = OsmPrimitive.getFilteredList(primitives, Node.class);
@@ -388,5 +389,5 @@
             w2 = selWays.get(1);
             via = selNodes.get(0);
-            if (! w1.getNodes().contains(via) || ! w2.getNodes().contains(via)){
+            if (!w1.getNodes().contains(via) || !w2.getNodes().contains(via)) {
                 // the selected node is not an acceptable via node
                 via = null;
@@ -394,23 +395,23 @@
         } else {
             // the selection doesn't consists of primitives for which we can build
-            // a turn restriction 
+            // a turn restriction
             return null;
         }
-        
+
         // if we get here, we know the two "legs" of the turn restriction. We may
         // or may not know a via node, though
         assert w1 != null;
         assert w2 != null;
-        
+
         Relation tr = new Relation();
         tr.put("type", "restriction");
         tr.addMember(new RelationMember("from", w1));
         tr.addMember(new RelationMember("to", w2));
-        
-        if (via != null){
+
+        if (via != null) {
             tr.addMember(new RelationMember("via", via));
             RelativeWayJoinOrientation orientation = determineWayJoinOrientation(w1, w2);
-            if (orientation != null){
-                switch(orientation){
+            if (orientation != null) {
+                switch(orientation) {
                 case LEFT:
                     tr.put("restriction", TurnRestrictionType.NO_LEFT_TURN.getTagValue());
@@ -418,5 +419,5 @@
                 case RIGHT:
                     tr.put("restriction", TurnRestrictionType.NO_RIGHT_TURN.getTagValue());
-                    break;                    
+                    break;
                 }
             }
@@ -424,5 +425,5 @@
         return tr;
     }
-       
+
     protected Relation initEmptyTurnRestriction() {
        Relation tr = new Relation();
@@ -430,23 +431,23 @@
        return tr;
     }
-    
-    /**
-     * Creates and initializes a new turn restriction based on primitives 
+
+    /**
+     * Creates and initializes a new turn restriction based on primitives
      * in {@code primitives}.
-     * 
-     * @param primitives the primitives 
+     *
+     * @param primitives the primitives
      * @return the new initialized turn restriction. The turn restriction isn't
      * added to the layer yet.
      */
-    public synchronized Relation build(List<OsmPrimitive> primitives){
+    public synchronized Relation build(List<OsmPrimitive> primitives) {
         if (primitives == null || primitives.isEmpty()) {
             return initEmptyTurnRestriction();
         }
         Relation tr;
-        switch(primitives.size()){
-        // case 0 already handled 
-        case 1: 
+        switch(primitives.size()) {
+        // case 0 already handled
+        case 1:
             tr = initEmptyTurnRestriction();
-            if (OsmPrimitive.getFilteredList(primitives, Way.class).size() == 1) {     
+            if (OsmPrimitive.getFilteredList(primitives, Way.class).size() == 1) {
                 // we have exactly one selected way? -> init the "from" leg
                 // of the turn restriction with it
@@ -454,5 +455,5 @@
             }
             return tr;
-            
+
         case 2:
             tr = initNoUTurnRestriction(primitives);
@@ -461,10 +462,10 @@
             if (tr != null) return tr;
             return initEmptyTurnRestriction();
-            
+
         default:
             tr = initTurnRestrictionFromTwoWays(primitives);
             if (tr != null) return tr;
-            return initEmptyTurnRestriction();       
-        }
-    }       
+            return initEmptyTurnRestriction();
+        }
+    }
 }
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/TurnRestrictionsPlugin.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/TurnRestrictionsPlugin.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/TurnRestrictionsPlugin.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions;
 
@@ -10,19 +11,19 @@
 /**
  * This is the main class for the turnrestrictions plugin.
- * 
+ *
  */
-public class TurnRestrictionsPlugin extends Plugin{
-    
+public class TurnRestrictionsPlugin extends Plugin {
+
     public TurnRestrictionsPlugin(PluginInformation info) {
-        super(info);        
+        super(info);
     }
-    
+
     /**
-     * Called when the JOSM map frame is created or destroyed. 
+     * Called when the JOSM map frame is created or destroyed.
      */
     @Override
-    public void mapFrameInitialized(MapFrame oldFrame, MapFrame newFrame) {             
+    public void mapFrameInitialized(MapFrame oldFrame, MapFrame newFrame) {
         if (oldFrame == null && newFrame != null) { // map frame added
-            TurnRestrictionsListDialog dialog  = new TurnRestrictionsListDialog();
+            TurnRestrictionsListDialog dialog = new TurnRestrictionsListDialog();
             // add the dialog
             newFrame.addToggleDialog(dialog);
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/dnd/PrimitiveIdListProvider.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/dnd/PrimitiveIdListProvider.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/dnd/PrimitiveIdListProvider.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.dnd;
 
@@ -8,5 +9,5 @@
      * Replies the list of currently selected primitive IDs. Replies an empty list if no primitive IDs
      * are selected.
-     * 
+     *
      * @return the list of currently selected primitive IDs
      */
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/dnd/PrimitiveIdListTransferHandler.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/dnd/PrimitiveIdListTransferHandler.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/dnd/PrimitiveIdListTransferHandler.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.dnd;
 
@@ -11,16 +12,15 @@
 
 /**
- * <p>PrimitiveIdListTransferHandler is a transfer handler for components which 
+ * <p>PrimitiveIdListTransferHandler is a transfer handler for components which
  * provide and/or accept a list of {@link PrimitiveId} via copy/paste or
  * drag-and-drop.</p>
- * 
+ *
  * <p>It creates a {@link Transferable} by retrieving the list of primitive IDs
  * from a {@link PrimitiveIdListProvider}.</p>
- * 
+ *
  */
 public class PrimitiveIdListTransferHandler extends TransferHandler {
-    //static private final Logger logger = Logger.getLogger(PrimitiveIdListTransferHandler.class.getName());
     private PrimitiveIdListProvider provider;
-    
+
     /**
      * Replies true if {@code transferFlavors} includes the data flavor {@link PrimitiveIdTransferable#PRIMITIVE_ID_LIST_FLAVOR}.
@@ -35,20 +35,22 @@
         return false;
     }
-    
+
     /**
-     * Creates the transfer handler 
-     * 
+     * Creates the transfer handler
+     *
      * @param provider the provider of the primitive IDs. Must not be null.
      * @throws IllegalArgumentException thrown if provider is null.
      */
-    public PrimitiveIdListTransferHandler(PrimitiveIdListProvider provider) throws IllegalArgumentException{
+    public PrimitiveIdListTransferHandler(PrimitiveIdListProvider provider) throws IllegalArgumentException {
         CheckParameterUtil.ensureParameterNotNull(provider, "provider");
         this.provider = provider;
     }
-    
+
+    @Override
     protected Transferable createTransferable(JComponent c) {
-        return new PrimitiveIdTransferable(provider.getSelectedPrimitiveIds());         
+        return new PrimitiveIdTransferable(provider.getSelectedPrimitiveIds());
     }
 
+    @Override
     public int getSourceActions(JComponent c) {
         return COPY;
@@ -57,5 +59,5 @@
     @Override
     public boolean canImport(JComponent comp, DataFlavor[] transferFlavors) {
-        return isSupportedFlavor(transferFlavors);  
-    }   
+        return isSupportedFlavor(transferFlavors);
+    }
 }
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/dnd/PrimitiveIdTransferable.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/dnd/PrimitiveIdTransferable.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/dnd/PrimitiveIdTransferable.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.dnd;
 
@@ -14,46 +15,45 @@
 /**
  * To be used for Drag-and-Drop of a set of {@link PrimitiveId}s between
- * two components. 
+ * two components.
  *
  */
-public class PrimitiveIdTransferable implements Transferable{
-    
+public class PrimitiveIdTransferable implements Transferable {
+
     /** the data flower for the set of of primitive ids */
-    static public final DataFlavor PRIMITIVE_ID_LIST_FLAVOR = 
+    public static final DataFlavor PRIMITIVE_ID_LIST_FLAVOR =
         new DataFlavor(Set.class, "a set of OSM primitive ids");
-    
-    /** 
+
+    /**
      * this transferable supports two flavors: (1) {@link #PRIMITIVE_ID_LIST_FLAVOR} and
      * (2) {@link DataFlavor#stringFlavor}.
-     * 
+     *
      * See also {@link #getPrimitiveIds()} and {@link #getAsString()}
      */
-    static public final DataFlavor[] SUPPORTED_FLAVORS = new DataFlavor[] {
+    public static final DataFlavor[] SUPPORTED_FLAVORS = new DataFlavor[] {
         PRIMITIVE_ID_LIST_FLAVOR,
         DataFlavor.stringFlavor
     };
 
-    
+
     private List<PrimitiveId> ids = new ArrayList<>();
-    
+
     /**
      * Creates a transferable from a collection of {@link PrimitiveId}s
-     * 
-     * @param ids
      */
     public PrimitiveIdTransferable(List<PrimitiveId> ids) {
         if (ids == null) return;
-        for(PrimitiveId id: ids) {
+        for (PrimitiveId id: ids) {
             this.ids.add(new SimplePrimitiveId(id.getUniqueId(), id.getType()));
         }
     }
-    
+
     /**
      * <p>If flavor is {@link #PRIMITIVE_ID_SET_FLAVOR}, replies a the list of
      * transferred {@link PrimitiveId}s</p>
-     * 
+     *
      * <p>If flavor is {@link DataFlavor#stringFlavor}, replies a string representation
      * of the list of transferred {@link PrimitiveId}s</p>
      */
+    @Override
     public Object getTransferData(DataFlavor flavor)
             throws UnsupportedFlavorException, IOException {
@@ -65,8 +65,8 @@
         throw new UnsupportedFlavorException(flavor);
     }
-    
+
     /**
      * Replies the list of OSM primitive ids
-     * 
+     *
      * @return the list of OSM primitive ids
      */
@@ -74,13 +74,13 @@
         return ids;
     }
-    
+
     /**
      * Replies a string representation of the list of OSM primitive ids
-     *  
+     *
      * @return a string representation of the list of OSM primitive ids
      */
     public String getAsString() {
         StringBuffer sb = new StringBuffer();
-        for(PrimitiveId id: ids) {
+        for (PrimitiveId id: ids) {
             if (sb.length() > 0) sb.append(",");
             sb.append(id.getType().getAPIName()).append("/").append(id.getUniqueId());
@@ -89,13 +89,15 @@
     }
 
+    @Override
     public DataFlavor[] getTransferDataFlavors() {
         return SUPPORTED_FLAVORS;
     }
 
+    @Override
     public boolean isDataFlavorSupported(DataFlavor flavor) {
-        for(DataFlavor df: SUPPORTED_FLAVORS) {
+        for (DataFlavor df: SUPPORTED_FLAVORS) {
             if (df.equals(flavor)) return true;
         }
         return false;
-    }           
+    }
 }
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/AdvancedEditorPanel.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/AdvancedEditorPanel.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/AdvancedEditorPanel.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.editor;
 
@@ -22,5 +23,4 @@
  */
 public class AdvancedEditorPanel extends JPanel {
-    //private static final Logger logger = Logger.getLogger(AdvancedEditorPanel.class.getName());
 
     private TurnRestrictionEditorModel model;
@@ -31,6 +31,4 @@
     /**
      * Creates the panel with the tag editor
-     *
-     * @return
      */
     protected JPanel buildTagEditorPanel() {
@@ -51,6 +49,4 @@
     /**
      * Builds the panel with the table for editing relation members
-     *
-     * @return
      */
     protected JPanel buildMemberEditorPanel() {
@@ -73,5 +69,4 @@
     /**
      * Creates the main split panel
-     * @return
      */
     protected JSplitPane buildSplitPane() {
@@ -99,5 +94,5 @@
      * @throws IllegalArgumentException thrown if model is null
      */
-    public AdvancedEditorPanel(TurnRestrictionEditorModel model) throws IllegalArgumentException{
+    public AdvancedEditorPanel(TurnRestrictionEditorModel model) throws IllegalArgumentException {
         CheckParameterUtil.ensureParameterNotNull(model, "model");
         this.model = model;
@@ -111,4 +106,5 @@
      */
     class SplitPaneDividerInitializer implements HierarchyListener {
+        @Override
         public void hierarchyChanged(HierarchyEvent e) {
             if (isShowing()) {
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/BasicEditorPanel.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/BasicEditorPanel.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/BasicEditorPanel.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.editor;
 
@@ -25,5 +26,5 @@
  * BasicEditorPanel provides a UI for editing the basic elements of a turn restriction,
  * i.e. its restriction type, the from, the to, and the via objects.
- * 
+ *
  */
 public class BasicEditorPanel extends VerticallyScrollablePanel {
@@ -31,5 +32,5 @@
     /** the turn restriction model */
     private TurnRestrictionEditorModel model;
-    
+
     /** the UI widgets */
     private TurnRestrictionLegEditor fromEditor;
@@ -40,5 +41,5 @@
     private TurnRestrictionComboBox cbTurnRestrictions;
     private VehicleExceptionEditor vehicleExceptionsEditor;
-    
+
     /**
      * builds the UI
@@ -50,9 +51,9 @@
         gc.fill = GridBagConstraints.HORIZONTAL;
         gc.weightx = 0.0;
-        
+
         // the editor for selecting the 'from' leg
-        gc.insets = new Insets(0,0,5,5);    
+        gc.insets = new Insets(0, 0, 5, 5);
         add(new JLabel(tr("Type:")), gc);
-        
+
         gc.gridx = 1;
         gc.weightx = 1.0;
@@ -61,11 +62,11 @@
         // the editor for selecting the 'from' leg
         gc.gridx = 0;
-        gc.gridy = 1;   
+        gc.gridy = 1;
         gc.weightx = 0.0;
         add(new JLabel(tr("From:")), gc);
-        
+
         gc.gridx = 1;
         gc.weightx = 1.0;
-        add(fromEditor = new TurnRestrictionLegEditor(model, TurnRestrictionLegRole.FROM),gc);
+        add(fromEditor = new TurnRestrictionLegEditor(model, TurnRestrictionLegRole.FROM), gc);
 
         // the editor for selecting the 'to' leg
@@ -73,18 +74,18 @@
         gc.gridy = 2;
         gc.weightx = 0.0;
-        gc.insets = new Insets(0,0,5,5);    
+        gc.insets = new Insets(0, 0, 5, 5);
         add(new JLabel(tr("To:")), gc);
-        
+
         gc.gridx = 1;
         gc.weightx = 1.0;
-        add(toEditor = new TurnRestrictionLegEditor(model, TurnRestrictionLegRole.TO),gc);
-        
-        // the editor for selecting the 'vias' 
+        add(toEditor = new TurnRestrictionLegEditor(model, TurnRestrictionLegRole.TO), gc);
+
+        // the editor for selecting the 'vias'
         gc.gridx = 0;
         gc.gridy = 3;
         gc.weightx = 0.0;
-        gc.insets = new Insets(0,0,5,5);    
+        gc.insets = new Insets(0, 0, 5, 5);
         add(lblVias = new JLabel(tr("Vias:")), gc);
-        
+
         gc.gridx = 1;
         gc.weightx = 1.0;
@@ -93,14 +94,15 @@
         spVias = new JScrollPane(lstVias = new ViaList(new ViaListModel(model, selectionModel), selectionModel)) {
             // fixes #6016 : Scrollbar hides field entry
+            @Override
             public Dimension getPreferredSize() {
                 return new Dimension(100, 80); // only height is relevant, 80 is just a heuristical value
              }
         };
-        add(spVias,gc);
+        add(spVias, gc);
         if (!Main.pref.getBoolean(PreferenceKeys.SHOW_VIAS_IN_BASIC_EDITOR, false)) {
             lblVias.setVisible(false);
             spVias.setVisible(false);
         }
-        
+
         // the editor for vehicle exceptions
         vehicleExceptionsEditor = new VehicleExceptionEditor(model);
@@ -110,8 +112,8 @@
         gc.weighty = 0.0;
         gc.gridwidth = 2;
-        gc.insets = new Insets(0,0,5,5);    
+        gc.insets = new Insets(0, 0, 5, 5);
         add(vehicleExceptionsEditor, gc);
-        
-        // just a filler - grabs remaining space 
+
+        // just a filler - grabs remaining space
         gc.gridx = 0;
         gc.gridy = 5;
@@ -120,12 +122,12 @@
         gc.fill = GridBagConstraints.BOTH;
         add(new JPanel(), gc);
-            
-        setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+
+        setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
     }
-    
-    
+
+
     /**
-     * Creates the panel. 
-     * 
+     * Creates the panel.
+     *
      * @param model the editor model. Must not be null.
      * @throws IllegalArgumentException thrown if model is null
@@ -137,15 +139,15 @@
         HelpUtil.setHelpContext(this, HelpUtil.ht("/Plugin/TurnRestrictions#BasicEditor"));
     }
-    
+
     /**
      * Requests the focus on one of the input widgets for turn
      * restriction data.
-     * 
+     *
      * @param focusTarget the target component to request focus for.
      * Ignored if null.
      */
-    public void requestFocusFor(BasicEditorFokusTargets focusTarget){
+    public void requestFocusfor(BasicEditorFokusTargets focusTarget) {
         if (focusTarget == null) return;
-        switch(focusTarget){
+        switch(focusTarget) {
         case RESTRICION_TYPE:
             cbTurnRestrictions.requestFocusInWindow();
@@ -161,25 +163,25 @@
             break;
         }
-    }   
-    
+    }
+
     /**
      * Initializes the set of icons used from the preference key
      * {@link PreferenceKeys#ROAD_SIGNS}.
-     * 
-     * @param prefs the JOSM preferences 
+     *
+     * @param prefs the JOSM preferences
      */
-    public void initIconSetFromPreferences(Preferences prefs){      
+    public void initIconSetFromPreferences(Preferences prefs) {
         cbTurnRestrictions.initIconSetFromPreferences(prefs);
     }
-    
+
     /**
      * Initializes the visibility of the list of via-objects depending
      * on values in the JOSM preferences
-     * 
+     *
      * @param prefs the JOSM preferences
      */
-    public void initViasVisibilityFromPreferences(Preferences prefs){
+    public void initViasVisibilityFromPreferences(Preferences prefs) {
         boolean value = prefs.getBoolean(PreferenceKeys.SHOW_VIAS_IN_BASIC_EDITOR, false);
-        if (value != lblVias.isVisible()){
+        if (value != lblVias.isVisible()) {
             lblVias.setVisible(value);
             spVias.setVisible(value);
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/ExceptValueModel.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/ExceptValueModel.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/ExceptValueModel.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.editor;
 
@@ -10,5 +11,5 @@
 /**
  * ExceptValueModel is a model for the value of the tag 'except' in a turn
- * restriction. 
+ * restriction.
  *
  */
@@ -16,7 +17,7 @@
     /**
      * The set of standard vehicle types which can be used in the
-     * 'except' tag 
-     */
-    static public final Set<String> STANDARD_VEHICLE_EXCEPTION_VALUES;
+     * 'except' tag
+     */
+    public static final Set<String> STANDARD_VEHICLE_EXCEPTION_VALUES;
     static {
         HashSet<String> s = new HashSet<>();
@@ -28,22 +29,22 @@
         STANDARD_VEHICLE_EXCEPTION_VALUES = Collections.unmodifiableSet(s);
     }
-    
+
     /**
      * Replies true, if {@code v} is a standard vehicle type. Replies
      * false if {@code v} is null
-     * 
-     * @param v the vehicle type. 
+     *
+     * @param v the vehicle type.
      * @return true, if {@code v} is a standard vehicle type.
      */
-    static public boolean isStandardVehicleExceptionValue(String v){
+    public static boolean isStandardVehicleExceptionValue(String v) {
         if (v == null) return false;
         v = v.trim().toLowerCase();
         return STANDARD_VEHICLE_EXCEPTION_VALUES.contains(v);
     }
-        
+
     private String value = "";
     private boolean isStandard = true;
     private final Set<String> vehicleExceptions = new HashSet<>();
-    
+
     protected void parseValue(String value) {
         if (value == null || value.trim().equals("")) value = "";
@@ -53,5 +54,5 @@
         if (value.equals("")) return;
         String[] values = value.split(";");
-        for (String v: values){
+        for (String v: values) {
             v = v.trim().toLowerCase();
             if (isStandardVehicleExceptionValue(v)) {
@@ -62,18 +63,18 @@
         }
     }
-    
-    /**
-     * Creates a new model for an empty standard value 
+
+    /**
+     * Creates a new model for an empty standard value
      */
     public ExceptValueModel() {}
-    
-    /**
-     * Creates a new model for the tag value {@code value}. 
-     * 
+
+    /**
+     * Creates a new model for the tag value {@code value}.
+     *
      * @param value the tag value
      * @see #parseValue(String)
      */
-    public ExceptValueModel(String value){
-        if (value == null || value.trim().equals("")) 
+    public ExceptValueModel(String value) {
+        if (value == null || value.trim().equals(""))
             return;
         parseValue(value);
@@ -82,9 +83,7 @@
     /**
      * Replies the tag value representing the state of this model.
-     * 
-     * @return 
      */
     public String getValue() {
-        if (isStandard){
+        if (isStandard) {
             StringBuffer sb = new StringBuffer();
             // we use an ordered list because equals()
@@ -93,5 +92,5 @@
             List<String> values = new ArrayList<>(vehicleExceptions);
             Collections.sort(values);
-            for (String v: values){
+            for (String v: values) {
                 if (sb.length() > 0) {
                     sb.append(";");
@@ -107,6 +106,4 @@
     /**
      * Sets the value in this model
-     * 
-     * @param value
      */
     public void setValue(String value) {
@@ -116,29 +113,27 @@
     /**
      * Replies true if this model currently holds a standard 'except' value
-     * 
-     * @return
      */
     public boolean isStandard() {
         return isStandard;
-    }   
-    
+    }
+
     /**
      * Tells this model to use standard values only.
-     * 
+     *
      */
     public void setStandard(boolean isStandard) {
         this.isStandard = isStandard;
     }
-    
+
     /**
      * Replies true if {@code vehicleType} is currently set as exception in this
      * model.
-     * 
+     *
      * @param vehicleType one of the standard vehicle types from {@see #STANDARD_VEHICLE_EXCEPTION_VALUES}
      * @return true if {@code vehicleType} is currently set as exception in this
      * model.
-     * @exception IllegalArgumentException thrown if {@code vehicleType} isn't a standard vehicle type 
-     */
-    public boolean isVehicleException(String vehicleType) throws IllegalArgumentException{
+     * @exception IllegalArgumentException thrown if {@code vehicleType} isn't a standard vehicle type
+     */
+    public boolean isVehicleException(String vehicleType) throws IllegalArgumentException {
         if (vehicleType == null) return false;
         if (!isStandardVehicleExceptionValue(vehicleType)) {
@@ -148,12 +143,12 @@
         return vehicleExceptions.contains(vehicleType);
     }
-    
+
     /**
      * Sets the {@code vehicleType} as exception in this turn restriction.
-     * 
-     * @param vehicleType one of the standard vehicle types from {@see #STANDARD_VEHICLE_EXCEPTION_VALUES}
-     * @exception IllegalArgumentException thrown if {@code vehicleType} isn't a standard vehicle type 
-     */
-    public void setVehicleException(String vehicleType) throws IllegalArgumentException{
+     *
+     * @param vehicleType one of the standard vehicle types from {@see #STANDARD_VEHICLE_EXCEPTION_VALUES}
+     * @exception IllegalArgumentException thrown if {@code vehicleType} isn't a standard vehicle type
+     */
+    public void setVehicleException(String vehicleType) throws IllegalArgumentException {
         if (!isStandardVehicleExceptionValue(vehicleType)) {
             throw new IllegalArgumentException(MessageFormat.format("vehicleType ''{0}'' isn''t a valid standard vehicle type", vehicleType));
@@ -161,16 +156,16 @@
         vehicleExceptions.add(vehicleType.trim().toLowerCase());
     }
-    
+
 
     /**
      * Sets or removes the {@code vehicleType} as exception in this turn restriction, depending
      * on whether {@code setOrRemove} is true or false, respectively.
-     * 
+     *
      * @param vehicleType one of the standard vehicle types from {@see #STANDARD_VEHICLE_EXCEPTION_VALUES}
      * @param setOrRemove if true, the exception is set; otherwise, it is removed
-     * @exception IllegalArgumentException thrown if {@code vehicleType} isn't a standard vehicle type 
-     */
-    public void setVehicleException(String vehicleType, boolean setOrRemove) throws IllegalArgumentException{
-        if (setOrRemove){
+     * @exception IllegalArgumentException thrown if {@code vehicleType} isn't a standard vehicle type
+     */
+    public void setVehicleException(String vehicleType, boolean setOrRemove) throws IllegalArgumentException {
+        if (setOrRemove) {
             setVehicleException(vehicleType);
         } else {
@@ -178,12 +173,12 @@
         }
     }
-    
+
     /**
      * Removes the {@code vehicleType} as exception in this turn restriction
-     * 
-     * @param vehicleType one of the standard vehicle types from {@see #STANDARD_VEHICLE_EXCEPTION_VALUES}
-     * @exception IllegalArgumentException thrown if {@code vehicleType} isn't a standard vehicle type 
-     */
-    public void removeVehicleException(String vehicleType) throws IllegalArgumentException{
+     *
+     * @param vehicleType one of the standard vehicle types from {@see #STANDARD_VEHICLE_EXCEPTION_VALUES}
+     * @exception IllegalArgumentException thrown if {@code vehicleType} isn't a standard vehicle type
+     */
+    public void removeVehicleException(String vehicleType) throws IllegalArgumentException {
         if (!isStandardVehicleExceptionValue(vehicleType)) {
             throw new IllegalArgumentException(MessageFormat.format("vehicleType ''{0}'' isn''t a valid standard vehicle type", vehicleType));
@@ -210,4 +205,4 @@
         ExceptValueModel other = (ExceptValueModel) obj;
         return getValue().equals(other.getValue());
-    }       
+    }
 }
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/JosmSelectionListModel.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/JosmSelectionListModel.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/JosmSelectionListModel.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.editor;
 
@@ -35,6 +36,6 @@
  *
  */
-public class JosmSelectionListModel extends AbstractListModel<OsmPrimitive> implements ActiveLayerChangeListener, SelectionChangedListener, DataSetListener, PrimitiveIdListProvider{
-    //static private final Logger logger = Logger.getLogger(JosmSelectionListModel.class.getName());
+public class JosmSelectionListModel extends AbstractListModel<OsmPrimitive>
+    implements ActiveLayerChangeListener, SelectionChangedListener, DataSetListener, PrimitiveIdListProvider {
 
     private final List<OsmPrimitive> selection = new ArrayList<>();
@@ -73,5 +74,5 @@
     public Collection<OsmPrimitive> getSelected() {
         Set<OsmPrimitive> sel = new HashSet<>();
-        for(int i=0; i< getSize();i++) {
+        for (int i = 0; i < getSize(); i++) {
             if (selectionModel.isSelectedIndex(i)) {
                 sel.add(selection.get(i));
@@ -89,7 +90,7 @@
         selectionModel.clearSelection();
         if (sel == null) return;
-        for (OsmPrimitive p: sel){
+        for (OsmPrimitive p: sel) {
             int i = selection.indexOf(p);
-            if (i >= 0){
+            if (i >= 0) {
                 selectionModel.addSelectionInterval(i, i);
             }
@@ -136,8 +137,8 @@
         if (toUpdate.isEmpty()) return;
         Collection<OsmPrimitive> sel = getSelected();
-        for (OsmPrimitive p: toUpdate){
+        for (OsmPrimitive p: toUpdate) {
             int i = selection.indexOf(p);
             if (i >= 0) {
-                super.fireContentsChanged(this, i,i);
+                super.fireContentsChanged(this, i, i);
             }
         }
@@ -158,5 +159,5 @@
             // don't show a JOSM selection if we don't have a data layer
             setJOSMSelection(null);
-        } else if (newLayer != layer){
+        } else if (newLayer != layer) {
             // don't show a JOSM selection if this turn restriction editor doesn't
             // manipulate data in the current data layer
@@ -175,5 +176,5 @@
         // this turn restriction editor is working on
         OsmDataLayer layer = Main.getLayerManager().getEditLayer();
-        if(layer == null) return;
+        if (layer == null) return;
         if (layer != this.layer) return;
         setJOSMSelection(newSelection);
@@ -226,4 +227,5 @@
     @Override
     public void primitivesAdded(PrimitivesAddedEvent event) {/* ignored - handled by SelectionChangeListener */}
+
     @Override
     public void primitivesRemoved(PrimitivesRemovedEvent event) {/* ignored - handled by SelectionChangeListener*/}
@@ -235,5 +237,5 @@
     public List<PrimitiveId> getSelectedPrimitiveIds() {
         List<PrimitiveId> ret = new ArrayList<>(getSelected().size());
-        for(int i=0; i< selection.size(); i++) {
+        for (int i = 0; i < selection.size(); i++) {
             if (selectionModel.isSelectedIndex(i)) {
                 ret.add(selection.get(i).getPrimitiveId());
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/JosmSelectionPanel.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/JosmSelectionPanel.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/JosmSelectionPanel.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.editor;
 
@@ -64,5 +65,5 @@
         add(new JLabel(tr("Selection")), BorderLayout.NORTH);
 
-        setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+        setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
         actCopy = new CopyAction();
         lstSelection.addMouseListener(new PopupLauncher());
@@ -75,5 +76,5 @@
      * @exception IllegalArgumentException thrown if {@code layer} is null
      */
-    public JosmSelectionPanel(OsmDataLayer layer, JosmSelectionListModel model) throws IllegalArgumentException{
+    public JosmSelectionPanel(OsmDataLayer layer, JosmSelectionListModel model) throws IllegalArgumentException {
         CheckParameterUtil.ensureParameterNotNull(layer, "layer");
         this.model = model;
@@ -107,5 +108,5 @@
 
     class PopupMenu extends JPopupMenu {
-        public PopupMenu() {
+        PopupMenu() {
             JMenuItem item = add(actCopy);
             item.setTransferHandler(transferHandler);
@@ -117,5 +118,5 @@
         private Action delegate;
 
-        public CopyAction(){
+        CopyAction() {
             putValue(NAME, tr("Copy"));
             putValue(SHORT_DESCRIPTION, tr("Copy to the clipboard"));
@@ -131,6 +132,6 @@
     }
 
-    static private class JosmSelectionTransferHandler extends PrimitiveIdListTransferHandler {
-        public JosmSelectionTransferHandler(PrimitiveIdListProvider provider) {
+    private static class JosmSelectionTransferHandler extends PrimitiveIdListTransferHandler {
+        JosmSelectionTransferHandler(PrimitiveIdListProvider provider) {
             super(provider);
         }
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/MemberRoleCellEditor.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/MemberRoleCellEditor.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/MemberRoleCellEditor.java	(revision 32519)
@@ -15,8 +15,8 @@
 /**
  * The cell editor for member roles of relation members in a turn restriction.
- * 
+ *
  */
 public class MemberRoleCellEditor extends AbstractCellEditor implements TableCellEditor {
-    //static private Logger logger = Logger.getLogger(MemberRoleCellEditor.class.getName());
+    //private static Logger logger = Logger.getLogger(MemberRoleCellEditor.class.getName());
 
     private AutoCompletingTextField editor = null;
@@ -41,12 +41,14 @@
      * replies the table cell editor
      */
+    @Override
     public Component getTableCellEditorComponent(JTable table,
             Object value, boolean isSelected, int row, int column) {
 
-        String role = (String)value;
-        editor.setText(role);        
+        String role = (String) value;
+        editor.setText(role);
         return editor;
     }
 
+    @Override
     public Object getCellEditorValue() {
         return editor.getText();
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/NavigationControler.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/NavigationControler.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/NavigationControler.java	(revision 32519)
@@ -1,13 +1,17 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.editor;
 
 public interface NavigationControler {
-    public enum BasicEditorFokusTargets {
+    enum BasicEditorFokusTargets {
         RESTRICION_TYPE,
         FROM,
         TO,
         VIA
-    }   
-    void gotoBasicEditor(); 
+    }
+
+    void gotoBasicEditor();
+
     void gotoAdvancedEditor();
-    void gotoBasicEditor(BasicEditorFokusTargets focusTarget);  
+
+    void gotoBasicEditor(BasicEditorFokusTargets focusTarget);
 }
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/RelationMemberColumnModel.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/RelationMemberColumnModel.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/RelationMemberColumnModel.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.editor;
 
@@ -14,15 +15,15 @@
  * displayed in the {@link AdvancedEditorPanel}.
  */
-public class RelationMemberColumnModel extends DefaultTableColumnModel{
+public class RelationMemberColumnModel extends DefaultTableColumnModel {
     protected void build() {
         TableColumn col = new TableColumn();
-        
+
          // the role column
          col.setHeaderValue(tr("Role"));
          col.setResizable(true);
-         col.setPreferredWidth(100);    
+         col.setPreferredWidth(100);
          col.setCellEditor(new MemberRoleCellEditor());
          addColumn(col);
-         
+
           // column 1 - the member
           col = new TableColumn(1);
@@ -31,14 +32,14 @@
           col.setPreferredWidth(300);
           col.setCellRenderer(new OsmPrimitivRenderer());
-          addColumn(col);         
+          addColumn(col);
     }
-    
+
     /**
      * Creates the column model with a given column selection model.
-     * 
+     *
      * @param colSelectionModel the column selection model. Must not be null.
      * @throws IllegalArgumentException thrown if {@code colSelectionModel} is null
      */
-    public RelationMemberColumnModel(DefaultListSelectionModel colSelectionModel) throws IllegalArgumentException{
+    public RelationMemberColumnModel(DefaultListSelectionModel colSelectionModel) throws IllegalArgumentException {
         CheckParameterUtil.ensureParameterNotNull(colSelectionModel, "colSelectionModel");
         setSelectionModel(colSelectionModel);
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/RelationMemberEditorModel.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/RelationMemberEditorModel.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/RelationMemberEditorModel.java	(revision 32519)
@@ -1,4 +1,4 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.editor;
-
 
 import static org.openstreetmap.josm.tools.I18n.tr;
@@ -23,20 +23,19 @@
 import org.openstreetmap.josm.tools.CheckParameterUtil;
 
-public class RelationMemberEditorModel extends AbstractTableModel{  
-    //static private final Logger logger = Logger.getLogger(RelationMemberEditorModel.class.getName());
+public class RelationMemberEditorModel extends AbstractTableModel {
     private final ArrayList<RelationMemberModel> members = new ArrayList<>();
     private OsmDataLayer layer;
     private DefaultListSelectionModel rowSelectionModel;
     private DefaultListSelectionModel colSelectionModel;
-    
+
     /**
      * Creates a new model in the context of an {@link OsmDataLayer}. Internally allocates
-     * a row and a column selection model, see {@link #getRowSelectionModel()} and 
+     * a row and a column selection model, see {@link #getRowSelectionModel()} and
      * {@link #getColSelectionModel()}.
-     * 
+     *
      * @param layer the data layer. Must not be null.
      * @exception IllegalArgumentException thrown if layer is null
      */
-    public RelationMemberEditorModel(OsmDataLayer layer) throws IllegalArgumentException{
+    public RelationMemberEditorModel(OsmDataLayer layer) throws IllegalArgumentException {
         CheckParameterUtil.ensureParameterNotNull(layer, "layer");
         this.layer = layer;
@@ -47,5 +46,5 @@
     /**
      *  Creates a new model in the context of an {@link OsmDataLayer}
-     *  
+     *
      * @param layer layer the data layer. Must not be null.
      * @param rowSelectionModel the row selection model. Must not be null.
@@ -55,5 +54,6 @@
      * @throws IllegalArgumentException thrown if colSelectionModel is null
      */
-    public RelationMemberEditorModel(OsmDataLayer layer, DefaultListSelectionModel rowSelectionModel, DefaultListSelectionModel colSelectionModel) throws IllegalArgumentException{
+    public RelationMemberEditorModel(OsmDataLayer layer, DefaultListSelectionModel rowSelectionModel,
+            DefaultListSelectionModel colSelectionModel) throws IllegalArgumentException {
         CheckParameterUtil.ensureParameterNotNull(layer, "layer");
         CheckParameterUtil.ensureParameterNotNull(rowSelectionModel, "rowSelectionModel");
@@ -66,14 +66,14 @@
     /**
      * Replies the row selection model used in this table model.
-     * 
-     * @return the row selection model 
+     *
+     * @return the row selection model
      */
     public DefaultListSelectionModel getRowSelectionModel() {
         return rowSelectionModel;
     }
-    
+
     /**
      * Replies the column selection model used in this table model.
-     * 
+     *
      * @return the col selection model
      */
@@ -81,17 +81,17 @@
         return colSelectionModel;
     }
-    
+
     /**
      * Replies the set of {@link OsmPrimitive}s with the role {@code role}. If no
      * such primitives exists, the empty set is returned.
-     * 
+     *
      * @return the set of {@link OsmPrimitive}s with the role {@code role}
      */
     protected Set<OsmPrimitive> getPrimitivesWithRole(String role) {
         HashSet<OsmPrimitive> ret = new HashSet<>();
-        for (RelationMemberModel rm: members){
-            if (rm.getRole().equals(role)){
+        for (RelationMemberModel rm: members) {
+            if (rm.getRole().equals(role)) {
                 OsmPrimitive p = layer.data.getPrimitiveById(rm.getTarget());
-                if (p != null){
+                if (p != null) {
                     ret.add(p);
                 }
@@ -100,15 +100,15 @@
         return ret;
     }
-    
+
     /**
      * Replies the list of {@link RelationMemberModel}s with the role {@code role}. If no
      * such primitives exists, the empty set is returned.
-     * 
+     *
      * @return the set of {@link RelationMemberModel}s with the role {@code role}
      */
     protected List<RelationMemberModel> getRelationMembersWithRole(String role) {
         ArrayList<RelationMemberModel> ret = new ArrayList<>();
-        for (RelationMemberModel rm: members){
-            if (rm.getRole().equals(role)){
+        for (RelationMemberModel rm: members) {
+            if (rm.getRole().equals(role)) {
                 ret.add(rm);
             }
@@ -116,15 +116,15 @@
         return ret;
     }
-    
+
     /**
      * Removes all members with role {@code role}.
-     * 
+     *
      * @param role the role. Ignored if null.
      * @return true if the list of members was modified; false, otherwise
      */
-    protected boolean removeMembersWithRole(String role){
+    protected boolean removeMembersWithRole(String role) {
         if (role == null) return false;
         boolean isChanged = false;
-        for(Iterator<RelationMemberModel> it = members.iterator(); it.hasNext(); ){
+        for (Iterator<RelationMemberModel> it = members.iterator(); it.hasNext();) {
             RelationMemberModel rm = it.next();
             if (rm.getRole().equals(role)) {
@@ -135,19 +135,19 @@
         return isChanged;
     }
-        
+
     /**
      * Replies the set of {@link OsmPrimitive}s with the role 'from'. If no
      * such primitives exists, the empty set is returned.
-     * 
+     *
      * @return the set of {@link OsmPrimitive}s with the role 'from'
      */
     public Set<OsmPrimitive> getFromPrimitives() {
-        return getPrimitivesWithRole("from");       
-    }
-    
+        return getPrimitivesWithRole("from");
+    }
+
     /**
      * Replies the set of {@link OsmPrimitive}s with the role 'to'. If no
      * such primitives exists, the empty set is returned.
-     * 
+     *
      * @return the set of {@link OsmPrimitive}s with the role 'from'
      */
@@ -155,45 +155,44 @@
         return getPrimitivesWithRole("to");
     }
-    
+
     /**
      * Replies the list of 'via' objects in the order they occur in the
      * member list. Replies an empty list if no vias exist
-     * 
-     * @return 
      */
     public List<OsmPrimitive> getVias() {
         ArrayList<OsmPrimitive> ret = new ArrayList<>();
-        for (RelationMemberModel rm: getRelationMembersWithRole("via")){
+        for (RelationMemberModel rm: getRelationMembersWithRole("via")) {
             ret.add(layer.data.getPrimitiveById(rm.getTarget()));
         }
         return ret;
     }
-    
+
     /**
      * Sets the list of vias. Removes all 'vias' if {@code vias} is null.
-     * 
+     *
      * null vias are skipped. A via must belong to the dataset of the layer in whose context
      * this editor is working, otherwise an {@link IllegalArgumentException} is thrown.
-     * 
+     *
      * @param vias the vias.
      * @exception IllegalArgumentException thrown if a via doesn't belong to the dataset of the layer
-     * in whose context this editor is working 
-     */
-    public void setVias(List<OsmPrimitive> vias) throws IllegalArgumentException{
+     * in whose context this editor is working
+     */
+    public void setVias(List<OsmPrimitive> vias) throws IllegalArgumentException {
         boolean viasDeleted = removeMembersWithRole("via");
-        if (vias == null || vias.isEmpty()){
-            if (viasDeleted){
+        if (vias == null || vias.isEmpty()) {
+            if (viasDeleted) {
                 fireTableDataChanged();
             }
             return;
         }
-        // check vias 
+        // check vias
         for (OsmPrimitive via: vias) {
             if (via == null) continue;
-            if (via.getDataSet() == null || via.getDataSet() != layer.data){
-                throw new IllegalArgumentException(MessageFormat.format("via object ''{0}'' must belong to dataset of layer ''{1}''", via.getDisplayName(DefaultNameFormatter.getInstance()), layer.getName()));
-            }
-        }
-        // add vias 
+            if (via.getDataSet() == null || via.getDataSet() != layer.data) {
+                throw new IllegalArgumentException(MessageFormat.format("via object ''{0}'' must belong to dataset of layer ''{1}''",
+                        via.getDisplayName(DefaultNameFormatter.getInstance()), layer.getName()));
+            }
+        }
+        // add vias
         for (OsmPrimitive via: vias) {
             if (via == null) continue;
@@ -203,25 +202,25 @@
         fireTableDataChanged();
     }
-    
+
     /**
      * Sets the turn restriction member with role {@code role}. Removes all
      * members with role {@code role} if {@code id} is null.
-     * 
-     * @param id the id 
+     *
+     * @param id the id
      * @return true if the model was modified; false, otherwise
      */
-    protected boolean setPrimitiveWithRole(PrimitiveId id, String role){
-        if (id == null){
+    protected boolean setPrimitiveWithRole(PrimitiveId id, String role) {
+        if (id == null) {
             return removeMembersWithRole(role);
         }
-        
+
         List<RelationMemberModel> fromMembers = getRelationMembersWithRole(role);
-        if (fromMembers.isEmpty()){
+        if (fromMembers.isEmpty()) {
             RelationMemberModel rm = new RelationMemberModel(role, id);
             members.add(rm);
             return true;
-        } else if (fromMembers.size() == 1){
+        } else if (fromMembers.size() == 1) {
             RelationMemberModel rm = fromMembers.get(0);
-            if (!rm.getTarget().equals(id)){
+            if (!rm.getTarget().equals(id)) {
                 rm.setTarget(id);
                 return true;
@@ -235,33 +234,33 @@
         }
     }
-    
+
     /**
      * Sets the turn restriction member with role 'from'. Removes all
      * members with role 'from' if {@code id} is null.
-     * 
-     * @param id the id 
-     */
-    public void setFromPrimitive(PrimitiveId id){
+     *
+     * @param id the id
+     */
+    public void setFromPrimitive(PrimitiveId id) {
         if (setPrimitiveWithRole(id, "from")) {
             fireTableDataChanged();
         }
     }
-    
+
     /**
      * Sets the turn restriction member with role 'to'. Removes all
      * members with role 'to' if {@code id} is null.
-     * 
-     * @param id the id 
-     */
-    public void setToPrimitive(PrimitiveId id){
+     *
+     * @param id the id
+     */
+    public void setToPrimitive(PrimitiveId id) {
         if (setPrimitiveWithRole(id, "to")) {
             fireTableDataChanged();
         }
     }
-    
+
     /**
      * Replies the set of {@link OsmPrimitive}s referred to by members in
      * this model.
-     * 
+     *
      * @return the set of {@link OsmPrimitive}s referred to by members in
      * this model.
@@ -269,5 +268,5 @@
     public Set<OsmPrimitive> getMemberPrimitives() {
         Set<OsmPrimitive> ret = new HashSet<>();
-        for (RelationMemberModel rm: members){
+        for (RelationMemberModel rm: members) {
             OsmPrimitive p = layer.data.getPrimitiveById(rm.getTarget());
             if (p != null) ret.add(p);
@@ -275,33 +274,33 @@
         return ret;
     }
-    
+
     /**
      * Populates the model with the relation member of a turn restriction. Clears
-     * the model if {@code tr} is null. 
-     * 
+     * the model if {@code tr} is null.
+     *
      * @param tr the turn restriction
      */
-    public void populate(Relation tr){
+    public void populate(Relation tr) {
         members.clear();
-        if (tr == null){
+        if (tr == null) {
             fireTableDataChanged();
             return;
         }
-        for(RelationMember rm: tr.getMembers()){
+        for (RelationMember rm: tr.getMembers()) {
             members.add(new RelationMemberModel(rm));
         }
         fireTableDataChanged();
     }
-    
+
     /**
      * Replaces the member of turn restriction {@code tr} by the relation members currently
      * edited in this model.
-     * 
+     *
      * @param tr the turn restriction. Ignored if null.
      */
-    public void applyTo(Relation tr){
+    public void applyTo(Relation tr) {
         if (tr == null) return;
         List<RelationMember> newMembers = new ArrayList<>();
-        for(RelationMemberModel model: members){
+        for (RelationMemberModel model: members) {
             RelationMember rm = new RelationMember(model.getRole(), layer.data.getPrimitiveById(model.getTarget()));
             newMembers.add(rm);
@@ -309,22 +308,22 @@
         tr.setMembers(newMembers);
     }
-    
-    /**
-     * Clears the roles of all relation members currently selected in the 
+
+    /**
+     * Clears the roles of all relation members currently selected in the
      * table.
      */
-    protected void clearSelectedRoles(){
-        for(int i=0; i < getRowCount();i++){
+    protected void clearSelectedRoles() {
+        for (int i = 0; i < getRowCount(); i++) {
             if (rowSelectionModel.isSelectedIndex(i)) {
                 members.get(i).setRole("");
             }
-        }       
-    }
-    
-    /**
-     * Removes the currently selected rows from the model 
+        }
+    }
+
+    /**
+     * Removes the currently selected rows from the model
      */
     protected void removedSelectedMembers() {
-        for(int i=getRowCount()-1; i >= 0;i--){
+        for (int i = getRowCount()-1; i >= 0; i--) {
             if (rowSelectionModel.isSelectedIndex(i)) {
                 members.remove(i);
@@ -332,31 +331,31 @@
         }
     }
-    
+
     /**
      * Deletes the current selection.
-     * 
+     *
      * If only cells in the first column are selected, the roles of the selected
      * members are reset to the empty string. Otherwise the selected members are
-     * removed from the model. 
-     * 
+     * removed from the model.
+     *
      */
     public void deleteSelected() {
         if (colSelectionModel.isSelectedIndex(0) && !colSelectionModel.isSelectedIndex(1)) {
             clearSelectedRoles();
-        } else if (rowSelectionModel.getMinSelectionIndex() >= 0){
+        } else if (rowSelectionModel.getMinSelectionIndex() >= 0) {
             removedSelectedMembers();
         }
         fireTableDataChanged();
     }
-    
+
     protected List<Integer> getSelectedIndices() {
         ArrayList<Integer> ret = new ArrayList<>();
-        for(int i =0; i < members.size(); i++){
-            if (rowSelectionModel.isSelectedIndex(i)) 
+        for (int i = 0; i < members.size(); i++) {
+            if (rowSelectionModel.isSelectedIndex(i))
                 ret.add(i);
         }
         return ret;
     }
-    
+
     public boolean canMoveUp() {
         List<Integer> sel = getSelectedIndices();
@@ -364,5 +363,5 @@
         return sel.get(0) > 0;
     }
-    
+
     public boolean canMoveDown() {
         List<Integer> sel = getSelectedIndices();
@@ -370,9 +369,9 @@
         return sel.get(sel.size()-1) < members.size()-1;
     }
-    
+
     public void moveUpSelected() {
         if (!canMoveUp()) return;
         List<Integer> sel = getSelectedIndices();
-        for (int idx: sel){
+        for (int idx: sel) {
             RelationMemberModel m = members.remove(idx);
             members.add(idx-1, m);
@@ -381,13 +380,13 @@
         rowSelectionModel.clearSelection();
         colSelectionModel.setSelectionInterval(0, 1);
-        for (int idx: sel){
+        for (int idx: sel) {
             rowSelectionModel.addSelectionInterval(idx-1, idx-1);
         }
     }
-    
+
     public void moveDownSelected() {
         if (!canMoveDown()) return;
         List<Integer> sel = getSelectedIndices();
-        for (int i = sel.size()-1; i>=0;i--){
+        for (int i = sel.size()-1; i >= 0; i--) {
             int idx = sel.get(i);
             RelationMemberModel m = members.remove(idx);
@@ -397,37 +396,39 @@
         rowSelectionModel.clearSelection();
         colSelectionModel.setSelectionInterval(0, 1);
-        for (int idx: sel){
+        for (int idx: sel) {
             rowSelectionModel.addSelectionInterval(idx+1, idx+1);
         }
     }
-    
+
     /**
      * <p>Inserts a list of new relation members with the empty role for the primitives
      * with id in {@code ids}. Inserts the new primitives at the position of the first
      * selected row. If no row is selected, at the end of the list.</p>
-     * 
-     * <p> null values are skipped. If there is an id for which there is no primitive in the context 
+     *
+     * <p> null values are skipped. If there is an id for which there is no primitive in the context
      *  layer, if the primitive is deleted or invisible, an {@link IllegalArgumentException}
      *  is thrown and nothing is inserted.</p>
-     * 
+     *
      * @param ids the list of ids. Ignored if null.
      * @throws IllegalArgumentException thrown if one of the ids can't be inserted
      */
     public void insertMembers(Collection<PrimitiveId> ids) throws IllegalArgumentException {
-        if (ids == null) return;    
+        if (ids == null) return;
         ArrayList<RelationMemberModel> newMembers = new ArrayList<>();
-        for (PrimitiveId id: ids){
+        for (PrimitiveId id: ids) {
             OsmPrimitive p = layer.data.getPrimitiveById(id);
-            if (p == null){
+            if (p == null) {
                 throw new IllegalArgumentException(tr("Cannot find object with id ''{0}'' in layer ''{1}''", id.toString(), layer.getName()));
             }
-            if (p.isDeleted() || ! p.isVisible()) {
-                throw new IllegalArgumentException(tr("Cannot add object ''{0}'' as relation member because it is deleted or invisible in layer ''{1}''", p.getDisplayName(DefaultNameFormatter.getInstance()), layer.getName()));              
-            }
-            newMembers.add(new RelationMemberModel("",id));
+            if (p.isDeleted() || !p.isVisible()) {
+                throw new IllegalArgumentException(
+                        tr("Cannot add object ''{0}'' as relation member because it is deleted or invisible in layer ''{1}''",
+                        p.getDisplayName(DefaultNameFormatter.getInstance()), layer.getName()));
+            }
+            newMembers.add(new RelationMemberModel("", id));
         }
         if (newMembers.isEmpty()) return;
         int insertPos = rowSelectionModel.getMinSelectionIndex();
-        if ( insertPos >=0){
+        if (insertPos >= 0) {
             members.addAll(insertPos, newMembers);
         } else {
@@ -435,19 +436,22 @@
         }
         fireTableDataChanged();
-        if (insertPos < 0) insertPos = 0;       
+        if (insertPos < 0) insertPos = 0;
         colSelectionModel.setSelectionInterval(0, 1); // select both columns
         rowSelectionModel.setSelectionInterval(insertPos, insertPos + newMembers.size()-1);
     }
 
+    @Override
     public int getColumnCount() {
         return 2;
     }
 
+    @Override
     public int getRowCount() {
         return members.size();
     }
 
+    @Override
     public Object getValueAt(int rowIndex, int columnIndex) {
-        switch(columnIndex){
+        switch(columnIndex) {
         case 0: return members.get(rowIndex).getRole();
         case 1: return layer.data.getPrimitiveById(members.get(rowIndex).getTarget());
@@ -464,6 +468,6 @@
     @Override
     public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
-        if (columnIndex !=0)return;
-        String role = (String)aValue;
+        if (columnIndex != 0) return;
+        String role = (String) aValue;
         RelationMemberModel model = members.get(rowIndex);
         model.setRole(role);
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/RelationMemberModel.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/RelationMemberModel.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/RelationMemberModel.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.editor;
 
@@ -15,11 +16,11 @@
  *
  */
-public class RelationMemberModel implements Serializable{
+public class RelationMemberModel implements Serializable {
     private String role;
     private SimplePrimitiveId target;
-    
+
     /**
      * Creates a new relation member model
-     * 
+     *
      * @param role the member role. Reset to "" if null.
      * @param target the id of the target object. Must not be null.
@@ -28,15 +29,15 @@
     public RelationMemberModel(String role, PrimitiveId target) throws IllegalArgumentException {
         CheckParameterUtil.ensureParameterNotNull(target, "target");
-        this.role = role == null? "" : role;
+        this.role = role == null ? "" : role;
         this.target = new SimplePrimitiveId(target.getUniqueId(), target.getType());
     }
-    
+
     /**
-     * Creates a new relation member model from a relation member 
-     * 
+     * Creates a new relation member model from a relation member
+     *
      * @param member the relation member. Must not be null.
      * @throws IllegalArgumentException thrown if {@code member} is null
      */
-    public RelationMemberModel(RelationMember member) throws IllegalArgumentException{
+    public RelationMemberModel(RelationMember member) throws IllegalArgumentException {
         CheckParameterUtil.ensureParameterNotNull(member, "member");
         this.role = member.getRole();
@@ -46,5 +47,5 @@
     /**
      * Replies the current role in this model. Never null.
-     * 
+     *
      * @return the current role in this model
      */
@@ -54,15 +55,15 @@
 
     /**
-     * Sets the current role in this model. 
-     * 
+     * Sets the current role in this model.
+     *
      * @param role the role. Reset to "" if null.
      */
     public void setRole(String role) {
-        this.role = role == null? "" : role;
+        this.role = role == null ? "" : role;
     }
 
     /**
      * Replies the id of the target object of this relation member.
-     * 
+     *
      * @return the id of the target object of this relation member.
      */
@@ -72,14 +73,14 @@
 
     /**
-     * Sets the id of the target object.  
-     * 
+     * Sets the id of the target object.
+     *
      * @param target the id of the target object. Must not be null.
      * @throws IllegalArgumentException thrown if {@code target} is null
      */
-    public void setTarget(PrimitiveId target) throws IllegalArgumentException{
+    public void setTarget(PrimitiveId target) throws IllegalArgumentException {
         CheckParameterUtil.ensureParameterNotNull(target, "target");
         this.target = new SimplePrimitiveId(target.getUniqueId(), target.getType());
     }
-    
+
     @Override
     public int hashCode() {
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/RelationMemberTable.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/RelationMemberTable.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/RelationMemberTable.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.editor;
 
@@ -74,5 +75,5 @@
         actDelete = new DeleteAction();
         model.getRelationMemberEditorModel().getRowSelectionModel().addListSelectionListener(actDelete);
-        registerKeyboardAction(actDelete, KeyStroke.getKeyStroke(KeyEvent.VK_DELETE,0), WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
+        registerKeyboardAction(actDelete, KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0), WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
 
         // initialize the paste action (will be used in the popup, the action map already includes
@@ -82,5 +83,5 @@
         actMoveUp = new MoveUpAction();
         model.getRelationMemberEditorModel().getRowSelectionModel().addListSelectionListener(actMoveUp);
-        registerKeyboardAction(actMoveUp,actMoveUp.getKeyStroke(), WHEN_FOCUSED);
+        registerKeyboardAction(actMoveUp, actMoveUp.getKeyStroke(), WHEN_FOCUSED);
 
         actMoveDown = new MoveDownAction();
@@ -93,21 +94,23 @@
      *
      */
-    class DeleteAction extends AbstractAction implements ListSelectionListener{
-        public DeleteAction() {
+    class DeleteAction extends AbstractAction implements ListSelectionListener {
+        DeleteAction() {
             putValue(NAME, tr("Delete"));
             putValue(SHORT_DESCRIPTION, tr("Clear the selected roles or delete the selected members"));
             new ImageProvider("deletesmall").getResource().attachImageIcon(this);
-            putValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_DELETE,0));
+            putValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0));
             updateEnabledState();
         }
 
         public void updateEnabledState() {
-            setEnabled(model.getRelationMemberEditorModel().getRowSelectionModel().getMinSelectionIndex()>=0);
-        }
-
+            setEnabled(model.getRelationMemberEditorModel().getRowSelectionModel().getMinSelectionIndex() >= 0);
+        }
+
+        @Override
         public void actionPerformed(ActionEvent e) {
             model.getRelationMemberEditorModel().deleteSelected();
         }
 
+        @Override
         public void valueChanged(ListSelectionEvent e) {
             updateEnabledState();
@@ -119,6 +122,6 @@
      *
      */
-    class PasteAction extends AbstractAction{
-        public PasteAction() {
+    class PasteAction extends AbstractAction {
+        PasteAction() {
             putValue(NAME, tr("Paste"));
             putValue(SHORT_DESCRIPTION, tr("Insert new relation members from object in the clipboard"));
@@ -133,4 +136,5 @@
         }
 
+        @Override
         @SuppressWarnings("unchecked")
         public void actionPerformed(ActionEvent evt) {
@@ -143,68 +147,74 @@
             try {
                 List<PrimitiveId> ids;
-                ids = (List<PrimitiveId>)cp.getData(PrimitiveIdTransferable.PRIMITIVE_ID_LIST_FLAVOR);
+                ids = (List<PrimitiveId>) cp.getData(PrimitiveIdTransferable.PRIMITIVE_ID_LIST_FLAVOR);
                 try {
                     model.getRelationMemberEditorModel().insertMembers(ids);
-                } catch(IllegalArgumentException e){
+                } catch (IllegalArgumentException e) {
                     e.printStackTrace();
                     // FIXME: provide user feedback
                 }
-            } catch(IOException e){
-                e.printStackTrace();
-            } catch(UnsupportedFlavorException e){
-                e.printStackTrace();
-            }
-        }
-    }
-
-    class MoveDownAction extends AbstractAction implements ListSelectionListener{
+            } catch (IOException e) {
+                e.printStackTrace();
+            } catch (UnsupportedFlavorException e) {
+                e.printStackTrace();
+            }
+        }
+    }
+
+    class MoveDownAction extends AbstractAction implements ListSelectionListener {
         private KeyStroke keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, KeyEvent.ALT_DOWN_MASK);
-        public MoveDownAction(){
+        MoveDownAction() {
             putValue(NAME, tr("Move down"));
             putValue(SHORT_DESCRIPTION, tr("Move the selected relation members down by one position"));
-            putValue(ACCELERATOR_KEY,keyStroke);
+            putValue(ACCELERATOR_KEY, keyStroke);
             new ImageProvider("dialogs", "movedown").getResource().attachImageIcon(this);
             updateEnabledState();
         }
 
+        @Override
         public void actionPerformed(ActionEvent e) {
             model.getRelationMemberEditorModel().moveDownSelected();
         }
 
-        public void updateEnabledState(){
+        public void updateEnabledState() {
             setEnabled(model.getRelationMemberEditorModel().canMoveDown());
         }
 
+        @Override
         public void valueChanged(ListSelectionEvent e) {
             updateEnabledState();
         }
-        public KeyStroke getKeyStroke() {
+
+        KeyStroke getKeyStroke() {
             return keyStroke;
         }
     }
 
-    class MoveUpAction extends AbstractAction implements ListSelectionListener{
+    class MoveUpAction extends AbstractAction implements ListSelectionListener {
         private KeyStroke keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_UP, KeyEvent.ALT_DOWN_MASK);
 
-        public MoveUpAction() {
+        MoveUpAction() {
             putValue(NAME, tr("Move up"));
             putValue(SHORT_DESCRIPTION, tr("Move the selected relation members up by one position"));
-            putValue(ACCELERATOR_KEY,keyStroke);
+            putValue(ACCELERATOR_KEY, keyStroke);
             new ImageProvider("dialogs", "moveup").getResource().attachImageIcon(this);
             updateEnabledState();
         }
 
+        @Override
         public void actionPerformed(ActionEvent e) {
             model.getRelationMemberEditorModel().moveUpSelected();
         }
 
-        public void updateEnabledState(){
+        public void updateEnabledState() {
             setEnabled(model.getRelationMemberEditorModel().canMoveUp());
         }
 
+        @Override
         public void valueChanged(ListSelectionEvent e) {
             updateEnabledState();
         }
-        public KeyStroke getKeyStroke() {
+
+        KeyStroke getKeyStroke() {
             return keyStroke;
         }
@@ -215,5 +225,5 @@
         public void launch(MouseEvent evt) {
             int row = rowAtPoint(evt.getPoint());
-            if (getSelectionModel().getMinSelectionIndex() < 0 && row >=0){
+            if (getSelectionModel().getMinSelectionIndex() < 0 && row >= 0) {
                 getSelectionModel().setSelectionInterval(row, row);
                 getColumnModel().getSelectionModel().setSelectionInterval(0, 1);
@@ -224,5 +234,5 @@
 
     class PopupMenu extends JPopupMenu {
-        public PopupMenu() {
+        PopupMenu() {
             JMenuItem item = add(actPaste);
             item.setTransferHandler(transferHandler);
@@ -252,8 +262,8 @@
             try {
                 List<PrimitiveId> ids;
-                ids = (List<PrimitiveId>)t.getTransferData(PrimitiveIdTransferable.PRIMITIVE_ID_LIST_FLAVOR);
+                ids = (List<PrimitiveId>) t.getTransferData(PrimitiveIdTransferable.PRIMITIVE_ID_LIST_FLAVOR);
                 try {
                     model.getRelationMemberEditorModel().insertMembers(ids);
-                } catch(IllegalArgumentException e){
+                } catch (IllegalArgumentException e) {
                     e.printStackTrace();
                     // FIXME: provide user feedback
@@ -261,7 +271,7 @@
                 }
                 return true;
-            } catch(IOException e){
-                e.printStackTrace();
-            } catch(UnsupportedFlavorException e){
+            } catch (IOException e) {
+                e.printStackTrace();
+            } catch (UnsupportedFlavorException e) {
                 e.printStackTrace();
             }
@@ -271,5 +281,5 @@
         @Override
         public int getSourceActions(JComponent c) {
-            return  COPY_OR_MOVE;
+            return COPY_OR_MOVE;
         }
     }
@@ -280,5 +290,5 @@
      *
      */
-    class RelationMemberTableDropTarget extends DropTarget{
+    class RelationMemberTableDropTarget extends DropTarget {
         private boolean dropAccepted = false;
 
@@ -287,5 +297,4 @@
 
          * @param transferFlavors an array of transferFlavors
-         * @return
          */
         protected boolean isSupportedFlavor(DataFlavor[] transferFlavors) {
@@ -296,10 +305,11 @@
         }
 
+        @Override
         public synchronized void dragEnter(DropTargetDragEvent dtde) {
             if (isSupportedFlavor(dtde.getCurrentDataFlavors())) {
-                if ((dtde.getSourceActions() & DnDConstants.ACTION_COPY_OR_MOVE) != 0){
+                if ((dtde.getSourceActions() & DnDConstants.ACTION_COPY_OR_MOVE) != 0) {
                     dtde.acceptDrag(DnDConstants.ACTION_COPY_OR_MOVE);
                     setColumnSelectionAllowed(false);
-                    dropAccepted  = true;
+                    dropAccepted = true;
                 } else {
                     dtde.rejectDrag();
@@ -310,4 +320,5 @@
         }
 
+        @Override
         public synchronized void dragExit(DropTargetEvent dte) {
             setColumnSelectionAllowed(true);
@@ -319,9 +330,10 @@
             int row = rowAtPoint(dtde.getLocation());
             int selectedRow = getSelectionModel().getMinSelectionIndex();
-            if (row >= 0 && row != selectedRow){
+            if (row >= 0 && row != selectedRow) {
                 getSelectionModel().setSelectionInterval(row, row);
             }
         }
 
+        @Override
         @SuppressWarnings("unchecked")
         public synchronized void drop(DropTargetDropEvent dtde) {
@@ -332,14 +344,14 @@
                 }
                 List<PrimitiveId> ids;
-                ids = (List<PrimitiveId>)dtde.getTransferable().getTransferData(PrimitiveIdTransferable.PRIMITIVE_ID_LIST_FLAVOR);
+                ids = (List<PrimitiveId>) dtde.getTransferable().getTransferData(PrimitiveIdTransferable.PRIMITIVE_ID_LIST_FLAVOR);
                 try {
                     model.getRelationMemberEditorModel().insertMembers(ids);
-                } catch(IllegalArgumentException e){
+                } catch (IllegalArgumentException e) {
                     e.printStackTrace();
                     // FIXME: provide user feedback
                 }
-            } catch(IOException e){
-                e.printStackTrace();
-            } catch(UnsupportedFlavorException e){
+            } catch (IOException e) {
+                e.printStackTrace();
+            } catch (UnsupportedFlavorException e) {
                 e.printStackTrace();
             } finally {
@@ -348,4 +360,5 @@
         }
 
+        @Override
         public synchronized void dropActionChanged(DropTargetDragEvent dtde) {
             if ((dtde.getSourceActions() & DnDConstants.ACTION_COPY_OR_MOVE) == 0) {
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionComboBox.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionComboBox.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionComboBox.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.editor;
 
@@ -9,33 +10,33 @@
  */
 public class TurnRestrictionComboBox extends JComboBox<Object> {
-    
+
     /**
-     * Constructor 
-     * 
+     * Constructor
+     *
      * @param model the combo box model. Must not be null.
      */
-    public TurnRestrictionComboBox(TurnRestrictionComboBoxModel model){
+    public TurnRestrictionComboBox(TurnRestrictionComboBoxModel model) {
         super(model);
         setEditable(false);
         setRenderer(new TurnRestrictionTypeRenderer());
     }
-    
+
     /**
-     * Replies the turn restriction combo box model 
-     * 
+     * Replies the turn restriction combo box model
+     *
      * @return the turn restriction combo box model
      */
     public TurnRestrictionComboBoxModel getTurnRestrictionComboBoxModel() {
-        return (TurnRestrictionComboBoxModel)getModel();
+        return (TurnRestrictionComboBoxModel) getModel();
     }
-    
+
     /**
      * Initializes the set of icons used from the preference key
      * {@link PreferenceKeys#ROAD_SIGNS}.
-     * 
-     * @param prefs the JOSM preferences 
+     *
+     * @param prefs the JOSM preferences
      */
-    public void initIconSetFromPreferences(Preferences prefs){
-        TurnRestrictionTypeRenderer renderer = (TurnRestrictionTypeRenderer)getRenderer();
+    public void initIconSetFromPreferences(Preferences prefs) {
+        TurnRestrictionTypeRenderer renderer = (TurnRestrictionTypeRenderer) getRenderer();
         renderer.initIconSetFromPreferences(prefs);
         repaint();
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionComboBoxModel.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionComboBoxModel.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionComboBoxModel.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.editor;
 
@@ -16,19 +17,18 @@
  * This is a model for a combo box to select a turn restriction type. The
  * user can choose from a list of standard types but the model also supports
- * non-standard tag values in the OSM data. 
+ * non-standard tag values in the OSM data.
  *
  */
-public class TurnRestrictionComboBoxModel implements ComboBoxModel<Object>, Observer{
-    //static private final Logger logger = Logger.getLogger(TurnRestrictionComboBoxModel.class.getName());
-    
+public class TurnRestrictionComboBoxModel implements ComboBoxModel<Object>, Observer {
+
     private TurnRestrictionEditorModel model;
-    final private List<Object> values = new ArrayList<>();
+    private final List<Object> values = new ArrayList<>();
     private String selectedTagValue = null;
     private final transient EventListenerList listeners = new EventListenerList();
-    
+
     /**
      * Populates the model with the list of standard values. If the
      * data contains a non-standard value it is displayed in the combo
-     * box as an additional element. 
+     * box as an additional element.
      */
     protected void populate() {
@@ -36,6 +36,6 @@
         for (TurnRestrictionType type: TurnRestrictionType.values()) {
             values.add(type);
-        }       
-        
+        }
+
         String tagValue = model.getRestrictionTagValue();
         if (tagValue.trim().equals("")) {
@@ -52,11 +52,11 @@
         fireContentsChanged();
     }
-    
+
     /**
-     * Creates the combo box model. 
-     * 
+     * Creates the combo box model.
+     *
      * @param model the turn restriction editor model. Must not be null.
      */
-    public TurnRestrictionComboBoxModel(TurnRestrictionEditorModel model){
+    public TurnRestrictionComboBoxModel(TurnRestrictionEditorModel model) {
         CheckParameterUtil.ensureParameterNotNull(model, "model");
         this.model = model;
@@ -65,4 +65,5 @@
     }
 
+    @Override
     public Object getSelectedItem() {
         TurnRestrictionType type = TurnRestrictionType.fromTagValue(selectedTagValue);
@@ -71,44 +72,50 @@
     }
 
+    @Override
     public void setSelectedItem(Object anItem) {
         String tagValue = null;
         if (anItem instanceof String) {
-            tagValue = (String)anItem;
-        } else if (anItem instanceof TurnRestrictionType){
-            tagValue = ((TurnRestrictionType)anItem).getTagValue();
+            tagValue = (String) anItem;
+        } else if (anItem instanceof TurnRestrictionType) {
+            tagValue = ((TurnRestrictionType) anItem).getTagValue();
         }
         model.setRestrictionTagValue(tagValue);
     }
 
+    @Override
     public Object getElementAt(int index) {
         return values.get(index);
     }
 
+    @Override
     public int getSize() {
         return values.size();
     }
-    
+
+    @Override
     public void addListDataListener(ListDataListener l) {
-        listeners.add(ListDataListener.class, l);       
+        listeners.add(ListDataListener.class, l);
     }
-    
+
+    @Override
     public void removeListDataListener(ListDataListener l) {
-        listeners.remove(ListDataListener.class, l);        
+        listeners.remove(ListDataListener.class, l);
     }
-    
+
     protected void fireContentsChanged() {
-        for(ListDataListener l: listeners.getListeners(ListDataListener.class)) {
+        for (ListDataListener l: listeners.getListeners(ListDataListener.class)) {
             l.contentsChanged(new ListDataEvent(this, ListDataEvent.CONTENTS_CHANGED, 0, getSize()));
         }
     }
-    
+
     /* ------------------------------------------------------------------------------------ */
     /* interface Observer                                                                   */
     /* ------------------------------------------------------------------------------------ */
-    public void update(Observable o, Object arg) {      
+    @Override
+    public void update(Observable o, Object arg) {
         String tagValue = model.getRestrictionTagValue();
         if (tagValue == null && selectedTagValue != null) {
             populate();
-        } else if (tagValue != null && selectedTagValue == null){
+        } else if (tagValue != null && selectedTagValue == null) {
             populate();
         } else if (tagValue != null) {
@@ -116,5 +123,5 @@
                 populate();
             }
-        } 
+        }
     }
 }
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditor.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditor.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditor.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.editor;
 
@@ -56,6 +57,5 @@
 import org.openstreetmap.josm.tools.ImageProvider;
 
-public class TurnRestrictionEditor extends JDialog implements NavigationControler{
-    //final private static Logger logger = Logger.getLogger(TurnRestrictionEditor.class.getName());
+public class TurnRestrictionEditor extends JDialog implements NavigationControler {
 
     /** the property name for the current turn restriction
@@ -63,10 +63,10 @@
      * @link #getRelation()
      */
-    static public final String TURN_RESTRICION_PROP = RelationEditor.class.getName() + ".turnRestriction";
+    public static final String TURN_RESTRICION_PROP = RelationEditor.class.getName() + ".turnRestriction";
 
     /** the property name for the current relation snapshot
      * @link #getRelationSnapshot()
      */
-    static public final String TURN_RESTRICION_SNAPSHOT_PROP = RelationEditor.class.getName() + ".turnRestrictionSnapshot";
+    public static final String TURN_RESTRICION_SNAPSHOT_PROP = RelationEditor.class.getName() + ".turnRestrictionSnapshot";
 
     /**
@@ -111,8 +111,7 @@
     /**
      * builds the panel which displays the JOSM selection
-     * @return
      */
     protected JPanel buildJOSMSelectionPanel() {
-        pnlJosmSelection = new JosmSelectionPanel(layer,editorModel.getJosmSelectionListModel());
+        pnlJosmSelection = new JosmSelectionPanel(layer, editorModel.getJosmSelectionListModel());
         return pnlJosmSelection;
     }
@@ -121,11 +120,9 @@
      * Builds the panel with the editor forms (the left panel in the split pane of
      * this dialog)
-     *
-     * @return
      */
     protected JPanel buildEditorPanel() {
         JPanel pnl = new JPanel(new BorderLayout());
         tpEditors = new JTabbedPane();
-        JScrollPane pane = new JScrollPane(pnlBasicEditor =new BasicEditorPanel(editorModel));
+        JScrollPane pane = new JScrollPane(pnlBasicEditor = new BasicEditorPanel(editorModel));
         pane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
         pane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
@@ -149,6 +146,4 @@
      * Builds the content panel, i.e. the core area of the dialog with the editor
      * masks and the JOSM selection view
-     *
-     * @return
      */
     protected JPanel buildContentPanel() {
@@ -176,5 +171,5 @@
      */
     protected JToolBar buildToolBar() {
-        JToolBar tb  = new JToolBar();
+        JToolBar tb = new JToolBar();
         tb.setFloatable(false);
         tb.add(new ApplyAction());
@@ -206,5 +201,5 @@
 
         editorModel.getIssuesModel().addObserver(new IssuesModelObserver());
-        setSize(600,600);
+        setSize(600, 600);
     }
 
@@ -228,6 +223,6 @@
      * @throws IllegalArgumentException thrown if layer is null
      */
-    public TurnRestrictionEditor(Component owner, OsmDataLayer layer, Relation turnRestriction)  throws IllegalArgumentException{
-        super(JOptionPane.getFrameForComponent(owner),false /* not modal */);
+    public TurnRestrictionEditor(Component owner, OsmDataLayer layer, Relation turnRestriction) throws IllegalArgumentException {
+        super(JOptionPane.getFrameForComponent(owner), false /* not modal */);
         CheckParameterUtil.ensureParameterNotNull(layer, "layer");
         this.layer = layer;
@@ -324,5 +319,5 @@
      */
     protected boolean isDirtyTurnRestriction() {
-        return ! turnRestriction.hasEqualSemanticAttributes(turnRestrictionSnapshot);
+        return !turnRestriction.hasEqualSemanticAttributes(turnRestrictionSnapshot);
     }
 
@@ -336,5 +331,5 @@
     @Override
     public void setVisible(boolean visible) {
-        if (visible && ! isVisible()) {
+        if (visible && !isVisible()) {
             pnlJosmSelection.wireListeners();
             editorModel.registerAsEventListener();
@@ -347,5 +342,5 @@
         }
         super.setVisible(visible);
-        if (!visible){
+        if (!visible) {
             dispose();
         }
@@ -355,5 +350,5 @@
     /* property change support                                                 */
     /* ----------------------------------------------------------------------- */
-    final private PropertyChangeSupport support = new PropertyChangeSupport(this);
+    private final PropertyChangeSupport support = new PropertyChangeSupport(this);
 
     @Override
@@ -383,5 +378,5 @@
     public void gotoBasicEditor(BasicEditorFokusTargets focusTarget) {
         tpEditors.setSelectedIndex(0);
-        pnlBasicEditor.requestFocusFor(focusTarget);
+        pnlBasicEditor.requestFocusfor(focusTarget);
     }
 
@@ -391,5 +386,5 @@
      */
     abstract class SavingAction extends AbstractAction {
-        protected boolean confirmSaveDespiteOfErrorsAndWarnings(){
+        protected boolean confirmSaveDespiteOfErrorsAndWarnings() {
             int numErrors = editorModel.getIssuesModel().getNumErrors();
             int numWarnings = editorModel.getIssuesModel().getNumWarnings();
@@ -446,5 +441,5 @@
         protected List<RelationMember> getDeletedRelationMembers(Relation r) {
             List<RelationMember> ret = new ArrayList<>();
-            for(RelationMember rm: r.getMembers()) {
+            for (RelationMember rm: r.getMembers()) {
                 if (rm.getMember().isDeleted() || !rm.getMember().isVisible()) {
                     ret.add(rm);
@@ -462,5 +457,5 @@
         protected void removeDeletedMembers(Relation tr) {
             List<RelationMember> members = tr.getMembers();
-            for(Iterator<RelationMember> it = members.iterator(); it.hasNext();) {
+            for (Iterator<RelationMember> it = members.iterator(); it.hasNext();) {
                 RelationMember rm = it.next();
                 if (rm.getMember().isDeleted() || !rm.getMember().isVisible()) {
@@ -490,5 +485,5 @@
                        + "of this turn restriction editor:", deletedMembers.size(), deletedMembers.size()));
             sb.append("<ul>");
-            for(RelationMember rm: deletedMembers){
+            for (RelationMember rm: deletedMembers) {
                 sb.append("<li>");
                 if (!rm.getRole().equals("")) {
@@ -550,5 +545,5 @@
             }
 
-            Main.main.undoRedo.add(new AddCommand(getLayer(),newTurnRestriction));
+            Main.main.undoRedo.add(new AddCommand(getLayer(), newTurnRestriction));
 
             // make sure everybody is notified about the changes
@@ -572,5 +567,5 @@
             editorModel.apply(toUpdate);
             Conflict<Relation> conflict = new Conflict<>(getTurnRestriction(), toUpdate);
-            Main.main.undoRedo.add(new ConflictAddCommand(getLayer(),conflict));
+            Main.main.undoRedo.add(new ConflictAddCommand(getLayer(), conflict));
         }
 
@@ -594,9 +589,9 @@
 
         protected boolean confirmClosingBecauseOfDirtyState() {
-            ButtonSpec [] options = new ButtonSpec[] {
+            ButtonSpec[] options = new ButtonSpec[] {
                     new ButtonSpec(
                             tr("Yes, create a conflict and close"),
                             ImageProvider.get("ok"),
-                            tr("Create a conflict and close this turn restriction editor") ,
+                            tr("Create a conflict and close this turn restriction editor"),
                             null /* no specific help topic */
                     ),
@@ -604,5 +599,5 @@
                             tr("No, continue editing"),
                             ImageProvider.get("cancel"),
-                            tr("Return to the turn restriction editor and resume editing") ,
+                            tr("Return to the turn restriction editor and resume editing"),
                             null /* no specific help topic */
                     )
@@ -641,5 +636,5 @@
 
     class ApplyAction extends SavingAction {
-        public ApplyAction() {
+        ApplyAction() {
             putValue(SHORT_DESCRIPTION, tr("Apply the current updates"));
             new ImageProvider("save").getResource().attachImageIcon(this);
@@ -649,5 +644,5 @@
 
         public void run() {
-            if (!confirmSaveDespiteOfErrorsAndWarnings()){
+            if (!confirmSaveDespiteOfErrorsAndWarnings()) {
                 tpEditors.setSelectedIndex(2); // show the errors and warnings
                 return;
@@ -685,5 +680,5 @@
 
     class OKAction extends SavingAction {
-        public OKAction() {
+        OKAction() {
             putValue(SHORT_DESCRIPTION, tr("Apply the updates and close the dialog"));
             new ImageProvider("ok").getResource().attachImageIcon(this);
@@ -693,5 +688,5 @@
 
         public void run() {
-            if (!confirmSaveDespiteOfErrorsAndWarnings()){
+            if (!confirmSaveDespiteOfErrorsAndWarnings()) {
                 tpEditors.setSelectedIndex(2); // show the errors and warnings
                 return;
@@ -707,5 +702,5 @@
             Relation toUpdate = new Relation(getTurnRestriction());
             editorModel.apply(toUpdate);
-            if (TurnRestrictionEditorModel.hasSameMembersAndTags(toUpdate, getTurnRestriction())){
+            if (TurnRestrictionEditorModel.hasSameMembersAndTags(toUpdate, getTurnRestriction())) {
                 // nothing to update
                 setVisible(false);
@@ -740,10 +735,11 @@
      */
     class CancelAction extends AbstractAction {
-        public CancelAction() {
+        CancelAction() {
             putValue(SHORT_DESCRIPTION, tr("Cancel the updates and close the dialog"));
             new ImageProvider("cancel").getResource().attachImageIcon(this);
             putValue(NAME, tr("Cancel"));
             putValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke("ESCAPE"));
-            TurnRestrictionEditor.this.getRootPane().registerKeyboardAction(this,KeyStroke.getKeyStroke("ESCAPE"), JComponent.WHEN_IN_FOCUSED_WINDOW);
+            TurnRestrictionEditor.this.getRootPane().registerKeyboardAction(this,
+                    KeyStroke.getKeyStroke("ESCAPE"), JComponent.WHEN_IN_FOCUSED_WINDOW);
             setEnabled(true);
         }
@@ -755,6 +751,6 @@
     }
 
-    class DeleteAction extends AbstractAction implements PropertyChangeListener{
-        public DeleteAction() {
+    class DeleteAction extends AbstractAction implements PropertyChangeListener {
+        DeleteAction() {
             putValue(NAME, tr("Delete"));
             putValue(SHORT_DESCRIPTION, tr("Delete this turn restriction"));
@@ -781,5 +777,5 @@
         @Override
         public void propertyChange(PropertyChangeEvent evt) {
-            if (evt.getPropertyName().equals(TURN_RESTRICION_PROP)){
+            if (evt.getPropertyName().equals(TURN_RESTRICION_PROP)) {
                 updateEnabledState();
             }
@@ -787,6 +783,6 @@
     }
 
-    class SelectAction extends AbstractAction implements PropertyChangeListener{
-        public SelectAction() {
+    class SelectAction extends AbstractAction implements PropertyChangeListener {
+        SelectAction() {
             putValue(NAME, tr("Select"));
             putValue(SHORT_DESCRIPTION, tr("Select this turn restriction"));
@@ -809,5 +805,5 @@
         @Override
         public void propertyChange(PropertyChangeEvent evt) {
-            if (evt.getPropertyName().equals(TURN_RESTRICION_PROP)){
+            if (evt.getPropertyName().equals(TURN_RESTRICION_PROP)) {
                 updateEnabledState();
             }
@@ -815,6 +811,6 @@
     }
 
-    class ZoomToAction extends AbstractAction implements PropertyChangeListener{
-        public ZoomToAction() {
+    class ZoomToAction extends AbstractAction implements PropertyChangeListener {
+        ZoomToAction() {
             putValue(NAME, tr("Zoom to"));
             putValue(SHORT_DESCRIPTION, tr("Activate the layer this turn restriction belongs to and zoom to it"));
@@ -830,5 +826,5 @@
         @Override
         public void actionPerformed(ActionEvent e) {
-            if (Main.getLayerManager().getActiveLayer() != getLayer()){
+            if (Main.getLayerManager().getActiveLayer() != getLayer()) {
                 Main.getLayerManager().setActiveLayer(getLayer());
             }
@@ -841,5 +837,5 @@
         @Override
         public void propertyChange(PropertyChangeEvent evt) {
-            if (evt.getPropertyName().equals(TURN_RESTRICION_PROP)){
+            if (evt.getPropertyName().equals(TURN_RESTRICION_PROP)) {
                 updateEnabledState();
             }
@@ -853,9 +849,9 @@
             int numErrors = editorModel.getIssuesModel().getNumErrors();
             String warningText = null;
-            if (numWarnings > 0){
+            if (numWarnings > 0) {
                 warningText = trn("{0} warning", "{0} warnings", numWarnings, numWarnings);
             }
             String errorText = null;
-            if (numErrors > 0){
+            if (numErrors > 0) {
                 errorText = trn("{0} error", "{0} errors", numErrors, numErrors);
             }
@@ -864,11 +860,11 @@
                 title += errorText;
             }
-            if (warningText != null){
-                if (title.length() > 0){
+            if (warningText != null) {
+                if (title.length() > 0) {
                     title += "/";
                 }
                 title += warningText;
             }
-            if (title.length() == 0){
+            if (title.length() == 0) {
                 title = tr("no issues");
             }
@@ -894,5 +890,5 @@
         @Override
         public void preferenceChanged(PreferenceChangeEvent evt) {
-            if (evt.getKey().equals(PreferenceKeys.ROAD_SIGNS)){
+            if (evt.getKey().equals(PreferenceKeys.ROAD_SIGNS)) {
                 refreshIconSet();
             } else if (evt.getKey().equals(PreferenceKeys.SHOW_VIAS_IN_BASIC_EDITOR)) {
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditorManager.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditorManager.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditorManager.java	(revision 32519)
@@ -26,5 +26,5 @@
  */
 public class TurnRestrictionEditorManager extends WindowAdapter implements LayerChangeListener {
-    //static private final Logger logger = Logger.getLogger(TurnRestrictionEditorManager.class.getName());
+    //private static final Logger logger = Logger.getLogger(TurnRestrictionEditorManager.class.getName());
 
     /** keeps track of open relation editors */
@@ -36,5 +36,5 @@
      * @return the singleton {@link TurnRestrictionEditorManager}
      */
-    static public TurnRestrictionEditorManager getInstance() {
+    public static TurnRestrictionEditorManager getInstance() {
         if (TurnRestrictionEditorManager.instance == null) {
             TurnRestrictionEditorManager.instance = new TurnRestrictionEditorManager();
@@ -48,9 +48,9 @@
      * restriction editor is open for turn restriction in a  {@link OsmDataLayer}
      */
-    static private class DialogContext {
+    private static class DialogContext {
         public final PrimitiveId primitiveId;
         public final OsmDataLayer layer;
 
-        public DialogContext(OsmDataLayer layer, PrimitiveId id) {
+        DialogContext(OsmDataLayer layer, PrimitiveId id) {
             this.layer = layer;
             this.primitiveId = id;
@@ -101,10 +101,10 @@
 
     /** the map of open dialogs */
-    private final HashMap<DialogContext, TurnRestrictionEditor> openDialogs =  new HashMap<>();
+    private final HashMap<DialogContext, TurnRestrictionEditor> openDialogs = new HashMap<>();
 
     /**
      * constructor
      */
-    public TurnRestrictionEditorManager(){}
+    public TurnRestrictionEditorManager() {}
 
     /**
@@ -190,5 +190,5 @@
     @Override
     public void windowClosed(WindowEvent e) {
-        TurnRestrictionEditor editor = (TurnRestrictionEditor)e.getWindow();
+        TurnRestrictionEditor editor = (TurnRestrictionEditor) e.getWindow();
         DialogContext context = null;
         for (DialogContext c : openDialogs.keySet()) {
@@ -209,10 +209,10 @@
      */
     protected void centerOnScreen(TurnRestrictionEditor editor) {
-        Point p = new Point(0,0);
+        Point p = new Point(0, 0);
         Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
         p.x = (d.width - editor.getSize().width)/2;
         p.y = (d.height - editor.getSize().height)/2;
-        p.x = Math.max(p.x,0);
-        p.y = Math.max(p.y,0);
+        p.x = Math.max(p.x, 0);
+        p.y = Math.max(p.y, 0);
         editor.setLocation(p);
     }
@@ -239,15 +239,13 @@
      * Positions a {@link TurnRestrictionEditor} close to the center of the screen, in such
      * a way, that it doesn't entirely cover another {@link TurnRestrictionEditor}
-     *
-     * @param editor
      */
     protected void positionCloseToScreenCenter(TurnRestrictionEditor editor) {
-        Point p = new Point(0,0);
+        Point p = new Point(0, 0);
         Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
         p.x = (d.width - editor.getSize().width)/2;
         p.y = (d.height - editor.getSize().height)/2;
-        p.x = Math.max(p.x,0);
-        p.y = Math.max(p.y,0);
-        while(hasEditorWithCloseUpperLeftCorner(p)) {
+        p.x = Math.max(p.x, 0);
+        p.y = Math.max(p.y, 0);
+        while (hasEditorWithCloseUpperLeftCorner(p)) {
             p.x += 20;
             p.y += 20;
@@ -280,11 +278,11 @@
     public void layerRemoving(LayerRemoveEvent e) {
         Layer oldLayer = e.getRemovedLayer();
-        if (oldLayer == null || ! (oldLayer instanceof OsmDataLayer))
+        if (oldLayer == null || !(oldLayer instanceof OsmDataLayer))
             return;
-        OsmDataLayer dataLayer = (OsmDataLayer)oldLayer;
-
-        Iterator<Entry<DialogContext,TurnRestrictionEditor>> it = openDialogs.entrySet().iterator();
-        while(it.hasNext()) {
-            Entry<DialogContext,TurnRestrictionEditor> entry = it.next();
+        OsmDataLayer dataLayer = (OsmDataLayer) oldLayer;
+
+        Iterator<Entry<DialogContext, TurnRestrictionEditor>> it = openDialogs.entrySet().iterator();
+        while (it.hasNext()) {
+            Entry<DialogContext, TurnRestrictionEditor> entry = it.next();
             if (entry.getKey().matchesLayer(dataLayer)) {
                 TurnRestrictionEditor editor = entry.getValue();
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditorModel.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditorModel.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditorModel.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.editor;
 
@@ -35,15 +36,14 @@
 /**
  * This is the model for the turn restriction editor. It keeps the editing state
- * for a single turn restriction. 
- * 
+ * for a single turn restriction.
+ *
  */
-public class TurnRestrictionEditorModel extends Observable implements DataSetListener{
-    //static private final Logger logger = Logger.getLogger(TurnRestrictionEditorModel.class.getName());
-    
+public class TurnRestrictionEditorModel extends Observable implements DataSetListener {
+
     /**
      * Replies true if {@code tp1} and {@code tp2} have the same tags and
-     * the same members 
-     * 
-     * @param tp1 a turn restriction. Must not be null. 
+     * the same members
+     *
+     * @param tp1 a turn restriction. Must not be null.
      * @param tp2 a turn restriction . Must not be null.
      * @return true if {@code tp1} and {@code tp2} have the same tags and
@@ -52,30 +52,30 @@
      * @throws IllegalArgumentException thrown if {@code tp2} is null
      */
-    static public boolean hasSameMembersAndTags(Relation tp1, Relation tp2) throws IllegalArgumentException {
+    public static boolean hasSameMembersAndTags(Relation tp1, Relation tp2) throws IllegalArgumentException {
         CheckParameterUtil.ensureParameterNotNull(tp1, "tp1");
         CheckParameterUtil.ensureParameterNotNull(tp2, "tp2");
         if (!TagCollection.from(tp1).asSet().equals(TagCollection.from(tp2).asSet())) return false;
         if (tp1.getMembersCount() != tp2.getMembersCount()) return false;
-        for(int i=0; i < tp1.getMembersCount();i++){
+        for (int i = 0; i < tp1.getMembersCount(); i++) {
             if (!tp1.getMember(i).equals(tp2.getMember(i))) return false;
         }
         return true;
     }
-    
+
     private OsmDataLayer layer;
     private final TagEditorModel tagEditorModel = new TagEditorModel();
-    private  RelationMemberEditorModel memberModel;
-    private  IssuesModel issuesModel;
+    private RelationMemberEditorModel memberModel;
+    private IssuesModel issuesModel;
     private NavigationControler navigationControler;
     private JosmSelectionListModel selectionModel;
-    
+
     /**
      * Creates a model in the context of a {@link OsmDataLayer}
-     * 
+     *
      * @param layer the layer. Must not be null.
-     * @param navigationControler control to direct the user to specific UI components. Must not be null 
+     * @param navigationControler control to direct the user to specific UI components. Must not be null
      * @throws IllegalArgumentException thrown if {@code layer} is null
      */
-    public TurnRestrictionEditorModel(OsmDataLayer layer, NavigationControler navigationControler) throws IllegalArgumentException{
+    public TurnRestrictionEditorModel(OsmDataLayer layer, NavigationControler navigationControler) throws IllegalArgumentException {
         CheckParameterUtil.ensureParameterNotNull(layer, "layer");
         CheckParameterUtil.ensureParameterNotNull(navigationControler, "navigationControler");
@@ -89,5 +89,5 @@
         selectionModel = new JosmSelectionListModel(layer);
     }
-    
+
     /**
      * Replies the model for the currently selected JOSM primitives
@@ -96,16 +96,16 @@
         return selectionModel;
     }
-    
+
     /**
      * Sets the way participating in the turn restriction in a given role.
-     * 
-     * @param role the role. Must not be null.  
+     *
+     * @param role the role. Must not be null.
      * @param way the way which participates in the turn restriction in the respective role.
      * null, to remove the way with the given role.
      * @exception IllegalArgumentException thrown if role is null
      */
-    public void setTurnRestrictionLeg(TurnRestrictionLegRole role, Way way) throws IllegalArgumentException{
+    public void setTurnRestrictionLeg(TurnRestrictionLegRole role, Way way) throws IllegalArgumentException {
         CheckParameterUtil.ensureParameterNotNull(role, "role");
-        switch(role){
+        switch(role) {
         case FROM:
             memberModel.setFromPrimitive(way);
@@ -115,43 +115,44 @@
             break;
         }
-    }   
-        
+    }
+
     /**
      * Sets the way participating in the turn restriction in a given role.
-     * 
-     * @param role the role. Must not be null.  
+     *
+     * @param role the role. Must not be null.
      * @param wayId the id of the way to set
      * @exception IllegalArgumentException thrown if role is null
      * @exception IllegalArgumentException thrown if wayId != null isn't the id of a way
-     * @exception IllegalStateException thrown the no way with this id was found in the dataset 
+     * @exception IllegalStateException thrown the no way with this id was found in the dataset
      */
     public void setTurnRestrictionLeg(TurnRestrictionLegRole role, PrimitiveId wayId) {
         CheckParameterUtil.ensureParameterNotNull(role, "role");
         if (wayId == null) {
-            setTurnRestrictionLeg(role, (Way)null);
+            setTurnRestrictionLeg(role, (Way) null);
             return;
         }
         if (!wayId.getType().equals(OsmPrimitiveType.WAY)) {
-            throw new IllegalArgumentException(MessageFormat.format("parameter ''wayId'' of type {0} expected, got {1}", OsmPrimitiveType.WAY, wayId.getType()));
+            throw new IllegalArgumentException(
+                    MessageFormat.format("parameter ''wayId'' of type {0} expected, got {1}", OsmPrimitiveType.WAY, wayId.getType()));
         }
 
         OsmPrimitive p = layer.data.getPrimitiveById(wayId);
         if (p == null) {
-            throw new IllegalStateException(MessageFormat.format("didn''t find way with id {0} in layer ''{1}''", wayId, layer.getName()));         
-        }
-        setTurnRestrictionLeg(role, (Way)p);
-    }   
-    
-    /**
-     * <p>"Officially" a turn restriction should have exactly one member with 
+            throw new IllegalStateException(MessageFormat.format("didn''t find way with id {0} in layer ''{1}''", wayId, layer.getName()));
+        }
+        setTurnRestrictionLeg(role, (Way) p);
+    }
+
+    /**
+     * <p>"Officially" a turn restriction should have exactly one member with
      * role {@link TurnRestrictionLegRole#FROM FROM} and one member with role {@link TurnRestrictionLegRole#TO TO},
      * both referring to an OSM {@link Way}. In order to deals with turn restrictions where these
      * integrity constraints are violated, this model also supports relation with multiple or no
      * 'from' or 'to' members.</p>
-     * 
+     *
      * <p>Replies the turn restriction legs with role {@code role}. If no leg with this
      * role exists, an empty set is returned. If multiple legs exists, the set of referred
-     * primitives is returned.</p>  
-     * 
+     * primitives is returned.</p>
+     *
      * @param role the role. Must not be null.
      * @return the set of turn restriction legs with role {@code role}. The empty set, if
@@ -159,7 +160,7 @@
      * @throws IllegalArgumentException thrown if role is null
      */
-    public Set<OsmPrimitive>getTurnRestrictionLeg(TurnRestrictionLegRole role){
+    public Set<OsmPrimitive> getTurnRestrictionLeg(TurnRestrictionLegRole role) {
         CheckParameterUtil.ensureParameterNotNull(role, "role");
-        switch(role){
+        switch(role) {
         case FROM: return memberModel.getFromPrimitives();
         case TO: return memberModel.getToPrimitives();
@@ -168,64 +169,65 @@
         return null;
     }
-    
+
     /**
      * Initializes the model from a relation representing a turn
      * restriction
-     * 
+     *
      * @param turnRestriction the turn restriction
      */
     protected void initFromTurnRestriction(Relation turnRestriction) {
-        
+
         // populate the member model
         memberModel.populate(turnRestriction);
-        
+
         // make sure we have a restriction tag
         TagCollection tags = TagCollection.from(turnRestriction);
         tags.setUniqueForKey("type", "restriction");
         tagEditorModel.initFromTags(tags);
-                
+
         setChanged();
         notifyObservers();
     }
-    
-    /**
-     * Populates the turn restriction editor model with a turn restriction. 
+
+    /**
+     * Populates the turn restriction editor model with a turn restriction.
      * {@code turnRestriction} is an arbitrary relation. A tag type=restriction
      * isn't required. If it is missing, it is added here. {@code turnRestriction}
-     * must not be null and it must belong to a dataset. 
-     * 
+     * must not be null and it must belong to a dataset.
+     *
      * @param turnRestriction the turn restriction
      * @throws IllegalArgumentException thrown if turnRestriction is null
-     * @throws IllegalArgumentException thrown if turnRestriction doesn't belong to a dataset  
+     * @throws IllegalArgumentException thrown if turnRestriction doesn't belong to a dataset
      */
     public void populate(Relation turnRestriction) {
         CheckParameterUtil.ensureParameterNotNull(turnRestriction, "turnRestriction");
-        if (turnRestriction.getDataSet() != null && turnRestriction.getDataSet() != layer.data) {           
+        if (turnRestriction.getDataSet() != null && turnRestriction.getDataSet() != layer.data) {
             throw new IllegalArgumentException(
                 // don't translate - it's a technical message
-                MessageFormat.format("turnRestriction {0} must not belong to a different dataset than the dataset of layer ''{1}''", turnRestriction.getId(), layer.getName())
+                MessageFormat.format("turnRestriction {0} must not belong to a different dataset than the dataset of layer ''{1}''",
+                        turnRestriction.getId(), layer.getName())
             );
         }
         initFromTurnRestriction(turnRestriction);
     }
-    
-    
+
+
     /**
      * Applies the current state in the model to a turn restriction
-     * 
+     *
      * @param turnRestriction the turn restriction. Must not be null.
      */
     public void apply(Relation turnRestriction) {
-        CheckParameterUtil.ensureParameterNotNull(turnRestriction, "turnRestriction");      
+        CheckParameterUtil.ensureParameterNotNull(turnRestriction, "turnRestriction");
         TagCollection tags = tagEditorModel.getTagCollection();
         turnRestriction.removeAll();
         tags.applyTo(turnRestriction);
-        memberModel.applyTo(turnRestriction);       
-    }
-    
+        memberModel.applyTo(turnRestriction);
+    }
+
     /**
      * Replies the current tag value for the tag <tt>restriction</tt>.
-     * The empty tag, if there isn't a tag <tt>restriction</tt>.  
-     * 
+     * The empty tag, if there isn't a tag <tt>restriction</tt>.
+     *
      * @return the tag value
      */
@@ -235,17 +237,17 @@
         return tags.getJoinedValues("restriction");
     }
-    
+
     /**
      * Sets the current value for the restriction tag. If {@code value} is
-     * null or an empty string, the restriction tag is removed. 
-     * 
-     * @param value the value of the restriction tag 
-     */
-    public void setRestrictionTagValue(String value){
+     * null or an empty string, the restriction tag is removed.
+     *
+     * @param value the value of the restriction tag
+     */
+    public void setRestrictionTagValue(String value) {
         if (value == null || value.trim().equals("")) {
-            tagEditorModel.delete("restriction");           
+            tagEditorModel.delete("restriction");
         } else {
-            TagModel  tm = tagEditorModel.get("restriction");
-            if (tm != null){
+            TagModel tm = tagEditorModel.get("restriction");
+            if (tm != null) {
                 tm.setValue(value);
             } else {
@@ -256,9 +258,9 @@
         notifyObservers();
     }
-    
+
     /**
      * Replies the list of 'via' objects. The return value is an
      * unmodifiable list.
-     *  
+     *
      * @return the list of 'via' objects
      */
@@ -266,24 +268,24 @@
         return memberModel.getVias();
     }
-    
+
     /**
      * <p>Sets the list of vias for the edited turn restriction.</p>
-     * 
+     *
      * <p>If {@code vias} is null, all vias are removed. All primitives
      * in {@code vias} must be assigned to a dataset and the dataset
      * must be equal to the dataset of this editor model, see {@link #getDataSet()}</p>
-     * 
+     *
      * <p>null values in {@link vias} are skipped.</p>
-     * 
-     * @param vias the list of vias 
-     * @throws IllegalArgumentException thrown if one of the via objects belongs to the wrong dataset 
-     */
-    public void setVias(List<OsmPrimitive> vias) throws IllegalArgumentException{
+     *
+     * @param vias the list of vias
+     * @throws IllegalArgumentException thrown if one of the via objects belongs to the wrong dataset
+     */
+    public void setVias(List<OsmPrimitive> vias) throws IllegalArgumentException {
         memberModel.setVias(vias);
     }
-    
+
     /**
      * Replies the layer in whose context this editor is working
-     * 
+     *
      * @return the layer in whose context this editor is working
      */
@@ -291,12 +293,12 @@
         return layer;
     }
-    
+
     /**
      * Registers this model with global event sources like {@link DatasetEventManager}
      */
-    public void registerAsEventListener(){
+    public void registerAsEventListener() {
         DatasetEventManager.getInstance().addDatasetListener(this, FireMode.IN_EDT);
     }
-    
+
     /**
      * Removes this model as listener from global event sources like  {@link DatasetEventManager}
@@ -305,8 +307,8 @@
         DatasetEventManager.getInstance().removeDatasetListener(this);
     }
-    
-    /**
-     * Replies the tag  editor model 
-     * 
+
+    /**
+     * Replies the tag  editor model
+     *
      * @return the tag  editor model
      */
@@ -314,8 +316,8 @@
         return tagEditorModel;
     }
-    
+
     /**
      * Replies the editor model for the relation members
-     * 
+     *
      * @return the editor model for the relation members
      */
@@ -323,9 +325,9 @@
         return memberModel;
     }
-    
+
     /**
      * Replies the model for the open issues in this turn restriction
      * editor.
-     * 
+     *
      * @return the model for the open issues in this turn restriction
      * editor
@@ -334,14 +336,12 @@
         return issuesModel;
     }
-    
+
     public NavigationControler getNavigationControler() {
         return navigationControler;
     }
-    
+
     /**
      * Replies the current value of the tag "except", or the empty string
      * if the tag doesn't exist.
-     * 
-     * @return
      */
     public ExceptValueModel getExcept() {
@@ -350,20 +350,20 @@
         return new ExceptValueModel(tag.getValue());
     }
-    
+
     /**
      * Sets the current value of the tag "except". Removes the
      * tag is {@code value} is null or consists of white
-     * space only. 
-     * 
+     * space only.
+     *
      * @param value the new value for 'except'
      */
-    public void setExcept(ExceptValueModel value){
+    public void setExcept(ExceptValueModel value) {
         if (value == null || value.getValue().equals("")) {
-            if (tagEditorModel.get("except") != null){
+            if (tagEditorModel.get("except") != null) {
                 tagEditorModel.delete("except");
                 setChanged();
-                notifyObservers();              
+                notifyObservers();
             }
-            return;         
+            return;
         }
         TagModel tag = tagEditorModel.get("except");
@@ -378,10 +378,10 @@
                 notifyObservers();
             }
-        }       
+        }
     }
 
     /* ----------------------------------------------------------------------------------------- */
     /* interface DataSetListener                                                                 */
-    /* ----------------------------------------------------------------------------------------- */ 
+    /* ----------------------------------------------------------------------------------------- */
     protected boolean isAffectedByDataSetUpdate(DataSet ds, List<? extends OsmPrimitive> updatedPrimitives) {
         if (ds != layer.data) return false;
@@ -392,11 +392,13 @@
         return size1 != myPrimitives.size();
     }
-    
+
+    @Override
     public void dataChanged(DataChangedEvent event) {
         // refresh the views
         setChanged();
-        notifyObservers();      
-    }
-
+        notifyObservers();
+    }
+
+    @Override
     public void nodeMoved(NodeMovedEvent event) {
         // may affect the display name of node in the list of vias
@@ -407,14 +409,21 @@
     }
 
+    @Override
     public void otherDatasetChange(AbstractDatasetChangedEvent event) {/* irrelevant in this context */}
 
+    @Override
     public void primitivesAdded(PrimitivesAddedEvent event) {/* irrelevant in this context */}
+
+    @Override
     public void primitivesRemoved(PrimitivesRemovedEvent event) {
-        // relevant for the state of this model but not handled here. When the 
-        // state of this model is applied to the dataset we check whether the 
-        // the turn restriction refers to deleted or invisible primitives 
-    }
-
+        // relevant for the state of this model but not handled here. When the
+        // state of this model is applied to the dataset we check whether the
+        // the turn restriction refers to deleted or invisible primitives
+    }
+
+    @Override
     public void relationMembersChanged(RelationMembersChangedEvent event) {/* irrelevant in this context */}
+
+    @Override
     public void tagsChanged(TagsChangedEvent event) {
         // may affect the display name of 'from', 'to' or 'via' elements
@@ -425,4 +434,5 @@
     }
 
+    @Override
     public void wayNodesChanged(WayNodesChangedEvent event) {
         // may affect the display name of 'from', 'to' or 'via' elements
@@ -430,22 +440,24 @@
             setChanged();
             notifyObservers();
-        }       
-    }   
-    
+        }
+    }
+
     class RelationMemberModelListener implements TableModelListener {
+        @Override
         public void tableChanged(TableModelEvent e) {
             setChanged();
             notifyObservers();
-        }       
+        }
     }
 
     /* ----------------------------------------------------------------------------------------- */
     /* inner classes                                                                             */
-    /* ----------------------------------------------------------------------------------------- */ 
+    /* ----------------------------------------------------------------------------------------- */
     class TagEditorModelObserver implements TableModelListener {
+        @Override
         public void tableChanged(TableModelEvent e) {
             setChanged();
             notifyObservers();
-        }       
+        }
     }
 }
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionLegEditor.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionLegEditor.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionLegEditor.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.editor;
 
@@ -59,5 +60,5 @@
  */
 public class TurnRestrictionLegEditor extends JPanel implements Observer, PrimitiveIdListProvider {
-    //static private final Logger logger = Logger.getLogger(TurnRestrictionLegEditor.class.getName());
+    //private static final Logger logger = Logger.getLogger(TurnRestrictionLegEditor.class.getName());
 
     private JLabel lblOsmObject;
@@ -82,9 +83,9 @@
                 BorderFactory.createCompoundBorder(
                         BorderFactory.createEtchedBorder(),
-                        BorderFactory.createEmptyBorder(1,1,1,1)
+                        BorderFactory.createEmptyBorder(1, 1, 1, 1)
                 )
         );
 
-        JPanel pnlButtons = new JPanel(new FlowLayout(FlowLayout.LEFT,0,0));
+        JPanel pnlButtons = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
         pnlButtons.setBorder(null);
         JButton btn;
@@ -103,5 +104,5 @@
 
         // focus handling
-        FocusHandler fh  = new FocusHandler();
+        FocusHandler fh = new FocusHandler();
         lblOsmObject.setFocusable(true);
         lblOsmObject.addFocusListener(fh);
@@ -115,5 +116,5 @@
 
         // enable DEL to remove the object from the turn restriction
-        registerKeyboardAction(actDelete,KeyStroke.getKeyStroke(KeyEvent.VK_DELETE,0) , JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
+        registerKeyboardAction(actDelete, KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0), JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
 
         getInputMap().put(Shortcut.getCopyKeyStroke(), TransferHandler.getCopyAction().getValue(Action.NAME));;
@@ -122,8 +123,8 @@
         getActionMap().put(TransferHandler.getPasteAction().getValue(Action.NAME), TransferHandler.getPasteAction());
         lblOsmObject.setTransferHandler(transferHandler = new LegEditorTransferHandler(this));
-        lblOsmObject.addMouseMotionListener(new MouseMotionAdapter(){
+        lblOsmObject.addMouseMotionListener(new MouseMotionAdapter() {
             @Override
             public void mouseDragged(MouseEvent e) {
-                JComponent c = (JComponent)e.getSource();
+                JComponent c = (JComponent) e.getSource();
                 TransferHandler th = c.getTransferHandler();
                 th.exportAsDrag(c, e, TransferHandler.COPY);
@@ -153,5 +154,5 @@
     }
 
-    protected void refresh(){
+    protected void refresh() {
         legs.clear();
         legs.addAll(model.getTurnRestrictionLeg(role));
@@ -161,5 +162,5 @@
             lblOsmObject.setText(tr("please select a way"));
             lblOsmObject.setToolTipText(null);
-        } else if (legs.size() == 1){
+        } else if (legs.size() == 1) {
             OsmPrimitive leg = legs.iterator().next();
             lblOsmObject.setFont(UIManager.getFont("Label.font"));
@@ -170,5 +171,5 @@
             lblOsmObject.setFont(UIManager.getFont("Label.font").deriveFont(Font.ITALIC));
             lblOsmObject.setIcon(null);
-            lblOsmObject.setText(tr("multiple objects with role ''{0}''",this.role.getOsmRole()));
+            lblOsmObject.setText(tr("multiple objects with role ''{0}''", this.role.getOsmRole()));
             lblOsmObject.setToolTipText(null);
         }
@@ -213,4 +214,5 @@
     /* interface Observer                                                            */
     /* ----------------------------------------------------------------------------- */
+    @Override
     public void update(Observable o, Object arg) {
         refresh();
@@ -220,4 +222,5 @@
     /* interface PrimitiveIdListProvider                                                            */
     /* ----------------------------------------------------------------------------- */
+    @Override
     public List<PrimitiveId> getSelectedPrimitiveIds() {
         if (legs.size() == 1) {
@@ -256,12 +259,13 @@
      */
     class DeleteAction extends AbstractAction {
-        public DeleteAction() {
+        DeleteAction() {
             putValue(SHORT_DESCRIPTION, tr("Delete from turn restriction"));
             putValue(NAME, tr("Delete"));
             new ImageProvider("deletesmall").getResource().attachImageIcon(this);
-            putValue(ACCELERATOR_KEY,KeyStroke.getKeyStroke(KeyEvent.VK_DELETE,0));
+            putValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0));
             updateEnabledState();
         }
 
+        @Override
         public void actionPerformed(ActionEvent e) {
             model.setTurnRestrictionLeg(role, null);
@@ -269,5 +273,5 @@
 
         public void updateEnabledState() {
-            setEnabled(legs.size()>0);
+            setEnabled(legs.size() > 0);
         }
     }
@@ -279,5 +283,5 @@
     class AcceptAction extends AbstractAction implements ListSelectionListener {
 
-        public AcceptAction() {
+        AcceptAction() {
              putValue(SHORT_DESCRIPTION, tr("Accept the currently selected way"));
              putValue(NAME, tr("Accept"));
@@ -287,5 +291,6 @@
         }
 
-         public void actionPerformed(ActionEvent e) {
+         @Override
+        public void actionPerformed(ActionEvent e) {
              List<Way> selWays = OsmPrimitive.getFilteredList(model.getJosmSelectionListModel().getSelected(), Way.class);
              if (selWays.size() != 1) return;
@@ -310,5 +315,5 @@
         Logger logger = Logger.getLogger(LegEditorTransferHandler.class.getName());
 
-        public LegEditorTransferHandler(PrimitiveIdListProvider provider){
+        LegEditorTransferHandler(PrimitiveIdListProvider provider) {
             super(provider);
         }
@@ -318,6 +323,6 @@
         public boolean importData(JComponent comp, Transferable t) {
             try {
-                List<PrimitiveId> ids = (List<PrimitiveId>)t.getTransferData(PrimitiveIdTransferable.PRIMITIVE_ID_LIST_FLAVOR);
-                if (ids.size() !=1) {
+                List<PrimitiveId> ids = (List<PrimitiveId>) t.getTransferData(PrimitiveIdTransferable.PRIMITIVE_ID_LIST_FLAVOR);
+                if (ids.size() != 1) {
                     return false;
                 }
@@ -326,8 +331,8 @@
                 model.setTurnRestrictionLeg(role, id);
                 return true;
-            } catch(IOException e) {
+            } catch (IOException e) {
                 // ignore
                 return false;
-            } catch(UnsupportedFlavorException e) {
+            } catch (UnsupportedFlavorException e) {
                 // ignore
                 return false;
@@ -350,5 +355,5 @@
 
     class PopupMenu extends JPopupMenu {
-        public PopupMenu() {
+        PopupMenu() {
             actCopy.updateEnabledState();
             JMenuItem item = add(actCopy);
@@ -365,5 +370,5 @@
         private Action delegate;
 
-        public CopyAction(){
+        CopyAction() {
             putValue(NAME, tr("Copy"));
             putValue(SHORT_DESCRIPTION, tr("Copy to the clipboard"));
@@ -374,4 +379,5 @@
         }
 
+        @Override
         public void actionPerformed(ActionEvent e) {
             delegate.actionPerformed(e);
@@ -395,5 +401,5 @@
         }
 
-        public PasteAction(){
+        PasteAction() {
             putValue(NAME, tr("Paste"));
             putValue(SHORT_DESCRIPTION, tr("Paste from the clipboard"));
@@ -407,9 +413,8 @@
         }
 
+        @Override
         public void actionPerformed(ActionEvent e) {
             delegate.actionPerformed(e);
         }
     }
-
-
 }
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionLegRole.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionLegRole.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionLegRole.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.editor;
 
@@ -4,14 +5,14 @@
  * Enumerates the two roles a "leg" in a turn restriction can have.
  */
-public enum TurnRestrictionLegRole {    
+public enum TurnRestrictionLegRole {
     FROM("from"),
     TO("to");
-    
+
     private String osmRoleName;
-    
-    private TurnRestrictionLegRole(String osmRoleName) {
+
+    TurnRestrictionLegRole(String osmRoleName) {
         this.osmRoleName = osmRoleName;
     }
-    
+
     public String getOsmRole() {
         return osmRoleName;
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionSelectionPopupPanel.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionSelectionPopupPanel.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionSelectionPopupPanel.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.editor;
 
@@ -48,6 +49,5 @@
  *
  */
-public class TurnRestrictionSelectionPopupPanel extends JPanel{
-    //static private final Logger logger = Logger.getLogger(TurnRestrictionSelectionPopupPanel.class.getName());
+public class TurnRestrictionSelectionPopupPanel extends JPanel {
 
     /** the parent popup */
@@ -66,16 +66,16 @@
      * @return the collection of "parent" turn restrictions.
      */
-    static public Collection<Relation> getTurnRestrictionsParticipatingIn(Collection<OsmPrimitive> primitives){
+    public static Collection<Relation> getTurnRestrictionsParticipatingIn(Collection<OsmPrimitive> primitives) {
         HashSet<Relation> ret = new HashSet<>();
         if (primitives == null) return ret;
-        for (OsmPrimitive p: primitives){
+        for (OsmPrimitive p: primitives) {
             if (p == null) continue;
             if (p.isDeleted() || !p.isVisible()) continue;
-            for (OsmPrimitive parent: p.getReferrers()){
+            for (OsmPrimitive parent: p.getReferrers()) {
                 if (!(parent instanceof Relation)) continue;
                 String type = parent.get("type");
-                if (type == null || ! type.equals("restriction")) continue;
-                if (parent.isDeleted() || ! parent.isVisible()) continue;
-                ret.add((Relation)parent);
+                if (type == null || !type.equals("restriction")) continue;
+                if (parent.isDeleted() || !parent.isVisible()) continue;
+                ret.add((Relation) parent);
             }
         }
@@ -89,8 +89,8 @@
      * @param editCandiates the edit candidates
      */
-    protected void registerEditShortcuts(Collection<Relation> editCandiates){
-        for(int i=1; i <= Math.min(editCandiates.size(),9);i++){
+    protected void registerEditShortcuts(Collection<Relation> editCandiates) {
+        for (int i = 1; i <= Math.min(editCandiates.size(), 9); i++) {
             int vkey = 0;
-            switch(i){
+            switch(i) {
             case 1: vkey = KeyEvent.VK_1; break;
             case 2: vkey = KeyEvent.VK_2; break;
@@ -103,7 +103,8 @@
             case 9: vkey = KeyEvent.VK_9; break;
             }
-            registerKeyboardAction(new EditTurnRestrictionAction(i-1), KeyStroke.getKeyStroke(vkey,0), WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
-        }
-    }
+            registerKeyboardAction(new EditTurnRestrictionAction(i-1), KeyStroke.getKeyStroke(vkey, 0), WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
+        }
+    }
+
     /**
      * Builds the panel with the turn restrictions table
@@ -117,5 +118,5 @@
         tblTurnRestrictions.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
         TurnRestrictionCellRenderer renderer = new TurnRestrictionCellRenderer();
-        tblTurnRestrictions.setRowHeight((int)renderer.getPreferredSize().getHeight());
+        tblTurnRestrictions.setRowHeight((int) renderer.getPreferredSize().getHeight());
 
         // create a scroll pane, remove the table header
@@ -129,5 +130,5 @@
         EditSelectedTurnRestrictionAction action = new EditSelectedTurnRestrictionAction();
         tblTurnRestrictions.addMouseListener(action);
-        tblTurnRestrictions.registerKeyboardAction(action, KeyStroke.getKeyStroke(KeyEvent.VK_ENTER,0), WHEN_FOCUSED);
+        tblTurnRestrictions.registerKeyboardAction(action, KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), WHEN_FOCUSED);
 
         tblTurnRestrictions.addFocusListener(new FocusHandler());
@@ -150,11 +151,11 @@
         add(btnNew = new JButton(new NewAction()), BorderLayout.NORTH);
         btnNew.setFocusable(true);
-        btnNew.registerKeyboardAction(btnNew.getAction(), KeyStroke.getKeyStroke(KeyEvent.VK_ENTER,0), WHEN_FOCUSED);
-        registerKeyboardAction(new CloseAction(), KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE,0), WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
-        registerKeyboardAction(btnNew.getAction(), KeyStroke.getKeyStroke(KeyEvent.VK_N,0), WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
+        btnNew.registerKeyboardAction(btnNew.getAction(), KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), WHEN_FOCUSED);
+        registerKeyboardAction(new CloseAction(), KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
+        registerKeyboardAction(btnNew.getAction(), KeyStroke.getKeyStroke(KeyEvent.VK_N, 0), WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
 
         btnNew.addFocusListener(new FocusHandler());
 
-        if (editCandiates != null && ! editCandiates.isEmpty()) {
+        if (editCandiates != null && !editCandiates.isEmpty()) {
             add(buildTurnRestrictionTablePanel(editCandiates), BorderLayout.CENTER);
             registerEditShortcuts(editCandiates);
@@ -193,8 +194,8 @@
      * Launches a popup with this panel as content
      */
-    public void launch(){
+    public void launch() {
         PointerInfo info = MouseInfo.getPointerInfo();
         Point pt = info.getLocation();
-        parentPopup = PopupFactory.getSharedInstance().getPopup(Main.map.mapView,this, pt.x, pt.y);
+        parentPopup = PopupFactory.getSharedInstance().getPopup(Main.map.mapView, this, pt.x, pt.y);
         parentPopup.show();
         btnNew.requestFocusInWindow();
@@ -203,5 +204,5 @@
     @Override
     public Dimension getPreferredSize() {
-        int bestheight = (int)btnNew.getPreferredSize().getHeight()
+        int bestheight = (int) btnNew.getPreferredSize().getHeight()
               + Math.min(2, tblTurnRestrictions.getRowCount()) * tblTurnRestrictions.getRowHeight()
               + 5;
@@ -214,5 +215,5 @@
 
     private class NewAction extends AbstractAction {
-        public NewAction() {
+        NewAction() {
             putValue(NAME, tr("Create new turn restriction"));
             putValue(SHORT_DESCRIPTION, tr("Launch the turn restriction editor to create a new turn restriction"));
@@ -221,10 +222,11 @@
         }
 
+        @Override
         public void actionPerformed(ActionEvent e) {
             Relation tr = new TurnRestrictionBuilder().buildFromSelection(layer);
-            TurnRestrictionEditor editor = new TurnRestrictionEditor(Main.map.mapView,layer,tr);
+            TurnRestrictionEditor editor = new TurnRestrictionEditor(Main.map.mapView, layer, tr);
             TurnRestrictionEditorManager.getInstance().positionOnScreen(editor);
             TurnRestrictionEditorManager.getInstance().register(layer, tr, editor);
-            if (parentPopup != null){
+            if (parentPopup != null) {
                 parentPopup.hide();
             }
@@ -233,9 +235,9 @@
     }
 
-    abstract private  class AbstractEditTurnRestrictionAction extends AbstractAction {
-        protected void launchEditor(Relation tr){
+    private abstract class AbstractEditTurnRestrictionAction extends AbstractAction {
+        protected void launchEditor(Relation tr) {
             TurnRestrictionEditorManager manager = TurnRestrictionEditorManager.getInstance();
             TurnRestrictionEditor editor = manager.getEditorForRelation(layer, tr);
-            if (parentPopup != null){
+            if (parentPopup != null) {
                 parentPopup.hide();
             }
@@ -244,7 +246,7 @@
                 editor.toFront();
             } else {
-                editor = new TurnRestrictionEditor(Main.map.mapView, layer,tr);
+                editor = new TurnRestrictionEditor(Main.map.mapView, layer, tr);
                 manager.positionOnScreen(editor);
-                manager.register(layer, tr,editor);
+                manager.register(layer, tr, editor);
                 editor.setVisible(true);
             }
@@ -255,24 +257,29 @@
         private int idx;
 
-        public EditTurnRestrictionAction(int idx){
+        EditTurnRestrictionAction(int idx) {
             this.idx = idx;
         }
 
+        @Override
         public void actionPerformed(ActionEvent e) {
-            Relation tr = (Relation)tblTurnRestrictions.getModel().getValueAt(idx, 1);
+            Relation tr = (Relation) tblTurnRestrictions.getModel().getValueAt(idx, 1);
             launchEditor(tr);
         }
     }
 
-    private class EditSelectedTurnRestrictionAction extends AbstractEditTurnRestrictionAction implements MouseListener{
-        public void editTurnRestrictionAtRow(int row){
+    private class EditSelectedTurnRestrictionAction extends AbstractEditTurnRestrictionAction implements MouseListener {
+        public void editTurnRestrictionAtRow(int row) {
             if (row < 0) return;
-            Relation tr = (Relation)tblTurnRestrictions.getModel().getValueAt(row, 1);
+            Relation tr = (Relation) tblTurnRestrictions.getModel().getValueAt(row, 1);
             launchEditor(tr);
         }
+
+        @Override
         public void actionPerformed(ActionEvent e) {
             int row = tblTurnRestrictions.getSelectedRow();
             editTurnRestrictionAtRow(row);
         }
+
+        @Override
         public void mouseClicked(MouseEvent e) {
             if (!(SwingUtilities.isLeftMouseButton(e) && e.getClickCount() >= 2)) return;
@@ -281,13 +288,22 @@
             editTurnRestrictionAtRow(row);
         }
+
+        @Override
         public void mouseEntered(MouseEvent e) {}
+
+        @Override
         public void mouseExited(MouseEvent e) {}
+
+        @Override
         public void mousePressed(MouseEvent e) {}
+
+        @Override
         public void mouseReleased(MouseEvent e) {}
     }
 
     private class CloseAction extends AbstractAction {
+        @Override
         public void actionPerformed(ActionEvent e) {
-            if (parentPopup != null){
+            if (parentPopup != null) {
                 parentPopup.hide();
             }
@@ -298,7 +314,7 @@
         private final ArrayList<Relation> turnrestrictions = new ArrayList<>();
 
-        public TurnRestrictionTableModel(Collection<Relation> turnrestrictions){
+        TurnRestrictionTableModel(Collection<Relation> turnrestrictions) {
             this.turnrestrictions.clear();
-            if (turnrestrictions != null){
+            if (turnrestrictions != null) {
                 this.turnrestrictions.addAll(turnrestrictions);
             }
@@ -306,16 +322,19 @@
         }
 
+        @Override
         public int getRowCount() {
             return turnrestrictions.size();
         }
 
+        @Override
         public int getColumnCount() {
             return 2;
         }
 
+        @Override
         public Object getValueAt(int rowIndex, int columnIndex) {
-            switch(columnIndex){
+            switch(columnIndex) {
             case 0:
-                if (rowIndex <=8 ) {
+                if (rowIndex <= 8) {
                     return Integer.toString(rowIndex+1);
                 } else {
@@ -331,5 +350,5 @@
 
     private static class TurnRestrictionTableColumnModel extends DefaultTableColumnModel {
-        public TurnRestrictionTableColumnModel() {
+        TurnRestrictionTableColumnModel() {
             // the idx column
             TableColumn col = new TableColumn(0);
@@ -352,6 +371,7 @@
             // if we loose the focus to a component outside of the popup panel
             // we hide the popup
-            if (e.getOppositeComponent() == null ||!SwingUtilities.isDescendingFrom(e.getOppositeComponent(), TurnRestrictionSelectionPopupPanel.this)) {
-                if (parentPopup != null){
+            if (e.getOppositeComponent() == null ||
+                    !SwingUtilities.isDescendingFrom(e.getOppositeComponent(), TurnRestrictionSelectionPopupPanel.this)) {
+                if (parentPopup != null) {
                     parentPopup.hide();
                 }
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionType.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionType.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionType.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.editor;
 
@@ -4,7 +5,7 @@
 
 /**
- * This is the enumeration of turn restriction types, see 
+ * This is the enumeration of turn restriction types, see
  * <a href="http://wiki.openstreetmap.org/wiki/Turn_restriction">OSM Wiki</a>
- * 
+ *
  */
 public enum TurnRestrictionType {
@@ -12,20 +13,20 @@
     NO_LEFT_TURN("no_left_turn", tr("No Left Turn")),
     NO_U_TURN("no_u_turn", tr("No U-Turn")),
-    NO_STRAIGHT_ON("no_straight_on", tr("No Straight On")), 
+    NO_STRAIGHT_ON("no_straight_on", tr("No Straight On")),
     ONLY_RIGHT_TURN("only_right_turn", tr("Only Right Turn")),
     ONLY_LEFT_TURN("only_left_turn", tr("Only Left Turn")),
     ONLY_STRAIGHT_ON("only_straight_on", tr("Only Straight On"));
-    
+
     private String tagValue;
     private String displayName;
-    
+
     TurnRestrictionType(String tagValue, String displayName) {
         this.tagValue = tagValue;
         this.displayName = displayName;
     }
-    
+
     /**
      * Replies the tag value for a specific turn restriction type
-     * 
+     *
      * @return the tag value for a specific turn restriction type
      */
@@ -33,5 +34,5 @@
         return tagValue;
     }
-    
+
     /**
      * Replies the localized display name for a turn restriction type
@@ -39,18 +40,18 @@
     public String getDisplayName() {
         return displayName;
-    }   
-    
+    }
+
     /**
      * Replies the enumeration value for a given tag value. null,
      * if {@code tagValue} is null or if there isnt an enumeration value
      * for this {@code tagValue}
-     *  
+     *
      * @param tagValue the tag value, i.e. <tt>no_left_turn</tt>
      * @return the enumeration value
      */
-    static public TurnRestrictionType fromTagValue(String tagValue) {
+    public static TurnRestrictionType fromTagValue(String tagValue) {
         if (tagValue == null) return null;
-        for(TurnRestrictionType type: values()) {
-            if(type.getTagValue().equals(tagValue)) return type;
+        for (TurnRestrictionType type: values()) {
+            if (type.getTagValue().equals(tagValue)) return type;
         }
         return null;
@@ -58,10 +59,10 @@
 
     /**
-     * Replies true if {@code tagValue} is a standard restriction type. 
-     * 
-     * @param tagValue the tag value 
+     * Replies true if {@code tagValue} is a standard restriction type.
+     *
+     * @param tagValue the tag value
      * @return true if {@code tagValue} is a standard restriction type
      */
-    static public boolean isStandardTagValue(String tagValue){
+    public static boolean isStandardTagValue(String tagValue) {
         return fromTagValue(tagValue) != null;
     }
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionTypeRenderer.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionTypeRenderer.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionTypeRenderer.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.editor;
 
@@ -18,47 +19,47 @@
 import org.openstreetmap.josm.tools.ImageProvider;
 
+public class TurnRestrictionTypeRenderer extends JLabel implements ListCellRenderer<Object> {
 
-public class TurnRestrictionTypeRenderer extends JLabel implements ListCellRenderer<Object> {
- 
-    final private Map<TurnRestrictionType, ImageIcon> icons = new HashMap<>();
+    private final Map<TurnRestrictionType, ImageIcon> icons = new HashMap<>();
     private String iconSet = "set-a";
-    
+
     /**
-     * Loads the image icons for the rendered turn restriction types 
+     * Loads the image icons for the rendered turn restriction types
      */
     protected void loadImages() {
-        for(TurnRestrictionType type: TurnRestrictionType.values()) {
+        for (TurnRestrictionType type: TurnRestrictionType.values()) {
             try {
-                ImageIcon icon = new ImageIcon(ImageProvider.get("types/" + iconSet, type.getTagValue()).getImage().getScaledInstance(16, 16, Image.SCALE_SMOOTH));
-                icons.put(type,icon);
-            } catch(Exception e){
+                ImageIcon icon = new ImageIcon(ImageProvider.get("types/" + iconSet,
+                        type.getTagValue()).getImage().getScaledInstance(16, 16, Image.SCALE_SMOOTH));
+                icons.put(type, icon);
+            } catch (Exception e) {
                 System.out.println(tr("Warning: failed to load icon for turn restriction type ''{0}''", type.getTagValue()));
-                e.printStackTrace();                
+                e.printStackTrace();
             }
         }
     }
-    
+
     public TurnRestrictionTypeRenderer() {
         setOpaque(true);
         loadImages();
     }
-    
-    protected void renderColors(boolean isSelected){
-        if (isSelected){
+
+    protected void renderColors(boolean isSelected) {
+        if (isSelected) {
             setBackground(UIManager.getColor("List.selectionBackground"));
             setForeground(UIManager.getColor("List.selectionForeground"));
         } else {
             setBackground(UIManager.getColor("List.background"));
-            setForeground(UIManager.getColor("List.foreground"));           
+            setForeground(UIManager.getColor("List.foreground"));
         }
     }
-    
+
     /**
      * Initializes the set of icons used from the preference key
      * {@link PreferenceKeys#ROAD_SIGNS}.
-     * 
-     * @param prefs the JOSM preferences 
+     *
+     * @param prefs the JOSM preferences
      */
-    public void initIconSetFromPreferences(Preferences prefs){      
+    public void initIconSetFromPreferences(Preferences prefs) {
         iconSet = prefs.get(PreferenceKeys.ROAD_SIGNS, "set-a");
         iconSet = iconSet.trim().toLowerCase();
@@ -68,21 +69,22 @@
         loadImages();
     }
-    
+
+    @Override
     public Component getListCellRendererComponent(JList<? extends Object> list, Object value,
             int index, boolean isSelected, boolean cellHasFocus) {
-        
+
         renderColors(isSelected);
         if (value == null) {
             setText(tr("please select a turn restriction type"));
             setIcon(null);
-        } else if (value instanceof String){
-            setText((String)value);
-            setIcon(null); // FIXME: special icon for non-standard types? 
-        } else if (value instanceof TurnRestrictionType){
-            TurnRestrictionType type = (TurnRestrictionType)value;
+        } else if (value instanceof String) {
+            setText((String) value);
+            setIcon(null); // FIXME: special icon for non-standard types?
+        } else if (value instanceof TurnRestrictionType) {
+            TurnRestrictionType type = (TurnRestrictionType) value;
             setText(type.getDisplayName());
             setIcon(icons.get(type));
         }
         return this;
-    }   
+    }
 }
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/VehicleExceptionEditor.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/VehicleExceptionEditor.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/VehicleExceptionEditor.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.editor;
 
@@ -32,9 +33,8 @@
  * VehicleExceptionEditor is UI widget for editing exceptions to a turn restriction
  * based on vehicle types.
- *  
+ *
  */
-public class VehicleExceptionEditor extends JPanel implements Observer{
-    //static private final Logger logger = Logger.getLogger(VehicleExceptionEditor.class.getName());
-    
+public class VehicleExceptionEditor extends JPanel implements Observer {
+
     private TurnRestrictionEditorModel model;
     private JCheckBox cbPsv;
@@ -50,7 +50,7 @@
     private JPanel pnlNonStandard;
     private ExceptValueModel exceptValue = new ExceptValueModel();
-    
+
     private StandardVehicleTypeChangeListener svtChangeListener;
-    
+
     private JPanel buildMessagePanel() {
         JPanel pnl = new JPanel(new BorderLayout());
@@ -64,11 +64,11 @@
         return pnl;
     }
-    
+
     private JPanel buildStandardInputPanel() {
         if (pnlStandard != null)
             return pnlStandard;
-        
+
         svtChangeListener = new StandardVehicleTypeChangeListener();
-        
+
         GridBagConstraints gc = new GridBagConstraints();
         gc.anchor = GridBagConstraints.NORTHWEST;
@@ -76,5 +76,5 @@
         gc.gridx = 0;
         gc.gridy = 0;
-        
+
         pnlStandard = new JPanel(new GridBagLayout());
         JLabel lbl;
@@ -85,5 +85,5 @@
         lbl.setToolTipText(tr("Public service vehicles like buses, tramways, etc."));
         lbl.setIcon(ImageProvider.get("vehicle", "psv"));
-        
+
         gc.weightx = 0.0;
         pnlStandard.add(cbPsv, gc);
@@ -91,5 +91,5 @@
         gc.gridx++;
         pnlStandard.add(lbl, gc);
-        
+
         cbHgv = new JCheckBox();
         cbHgv.addItemListener(svtChangeListener);
@@ -110,5 +110,5 @@
         lbl.setText(tr("Motorcars"));
         lbl.setIcon(ImageProvider.get("vehicle", "motorcar"));
-        
+
         gc.weightx = 0.0;
         gc.gridx = 0;
@@ -118,5 +118,5 @@
         gc.gridx++;
         pnlStandard.add(lbl, gc);
-        
+
         cbBicyle = new JCheckBox();
         cbBicyle.addItemListener(svtChangeListener);
@@ -124,5 +124,5 @@
         lbl.setText(tr("Bicycles"));
         lbl.setIcon(ImageProvider.get("vehicle", "bicycle"));
-        
+
         gc.weightx = 0.0;
         gc.gridx++;
@@ -131,10 +131,10 @@
         gc.gridx++;
         pnlStandard.add(lbl, gc);
-        
+
         cbMoped = new JCheckBox();
         cbMoped.addItemListener(svtChangeListener);
         lbl = new JLabel(tr("Mopeds"));
         lbl.setIcon(ImageProvider.get("vehicle", "moped"));
-        
+
         gc.weightx = 0.0;
         gc.gridx = 0;
@@ -144,8 +144,8 @@
         gc.gridx++;
         pnlStandard.add(lbl, gc);
-        
+
         return pnlStandard;
     }
-    
+
     private JPanel buildNonStandardInputPanel() {
         if (pnlNonStandard != null)
@@ -159,5 +159,5 @@
         gc.gridx = 0;
         gc.gridy = 0;
-        
+
         pnlNonStandard.add(new JLabel(tr("Value:")), gc);
         gc.gridx = 1;
@@ -165,5 +165,5 @@
         pnlNonStandard.add(tfNonStandardValue = new JTextField(), gc);
         SelectAllOnFocusGainedDecorator.decorate(tfNonStandardValue);
-        
+
         NonStandardVehicleTypesHandler inputChangedHandler = new NonStandardVehicleTypesHandler();
         tfNonStandardValue.addActionListener(inputChangedHandler);
@@ -171,7 +171,7 @@
         return pnlNonStandard;
     }
-        
+
     /**
-     * Builds the UI for entering standard values 
+     * Builds the UI for entering standard values
      */
     protected void buildStandard() {
@@ -184,11 +184,11 @@
         gc.gridy = 0;
         add(buildMessagePanel(), gc);
-        
-        gc.gridy=1;
-        add(buildStandardInputPanel(), gc);     
-    }
-    
+
+        gc.gridy = 1;
+        add(buildStandardInputPanel(), gc);
+    }
+
     /**
-     * Builds the UI for entering either standard or non-standard values 
+     * Builds the UI for entering either standard or non-standard values
      */
     protected void buildNonStandard() {
@@ -201,39 +201,39 @@
         gc.gridy = 0;
         add(buildMessagePanel(), gc);
-                
-        gc.gridx=0;
-        gc.gridy=1;
-        gc.insets = new Insets(0,0,0,0);
+
+        gc.gridx = 0;
+        gc.gridy = 1;
+        gc.insets = new Insets(0, 0, 0, 0);
         add(rbStandardException = new JRadioButton(tr("Use standard exceptions")), gc);
 
-        gc.gridx=0;
-        gc.gridy=2;
-        gc.insets = new Insets(0, 20, 0,0);
+        gc.gridx = 0;
+        gc.gridy = 2;
+        gc.insets = new Insets(0, 20, 0, 0);
         add(buildStandardInputPanel(), gc);
 
-        gc.gridx=0;
-        gc.gridy=3;
-        gc.insets = new Insets(0,0,0,0);
+        gc.gridx = 0;
+        gc.gridy = 3;
+        gc.insets = new Insets(0, 0, 0, 0);
         add(rbNonStandardException = new JRadioButton(tr("Use non-standard exceptions")), gc);
 
-        gc.gridx=0;
-        gc.gridy=4;
-        gc.insets = new Insets(0, 20, 0,0);
+        gc.gridx = 0;
+        gc.gridy = 4;
+        gc.insets = new Insets(0, 20, 0, 0);
         add(buildNonStandardInputPanel(), gc);
-        
+
         bgStandardOrNonStandard = new ButtonGroup();
         bgStandardOrNonStandard.add(rbNonStandardException);
         bgStandardOrNonStandard.add(rbStandardException);
-        
+
         StandardNonStandardChangeHandler changeHandler = new StandardNonStandardChangeHandler();
         rbNonStandardException.addItemListener(changeHandler);
         rbStandardException.addItemListener(changeHandler);
     }
-    
+
     protected void build() {
         removeAll();
         buildNonStandardInputPanel();
         buildStandardInputPanel();
-        if (exceptValue.isStandard()){
+        if (exceptValue.isStandard()) {
             buildStandard();
         } else {
@@ -243,5 +243,5 @@
         invalidate();
     }
-    
+
     protected void init() {
         try {
@@ -257,5 +257,5 @@
             this.svtChangeListener.setEnabled(true);
         }
-        if (!exceptValue.isStandard()){
+        if (!exceptValue.isStandard()) {
             rbNonStandardException.setSelected(true);
             tfNonStandardValue.setText(exceptValue.getValue());
@@ -267,21 +267,21 @@
         }
     }
-    
+
     protected void setEnabledStandardInputPanel(boolean enabled) {
-        for (Component c: pnlStandard.getComponents()){
+        for (Component c: pnlStandard.getComponents()) {
             c.setEnabled(enabled);
         }
     }
-    
+
     protected void setEnabledNonStandardInputPanel(boolean enabled) {
-        for (Component c: pnlNonStandard.getComponents()){
+        for (Component c: pnlNonStandard.getComponents()) {
             c.setEnabled(enabled);
         }
     }
 
-    
+
     /**
-     * Creates the editor 
-     * 
+     * Creates the editor
+     *
      * @param model the editor model. Must not be null.
      * @throws IllegalArgumentException thrown if {@code model} is null
@@ -293,8 +293,9 @@
         model.addObserver(this);
     }
-    
+
     /* ------------------------------------------------------------------------------------ */
     /* interface Observer                                                                   */
     /* ------------------------------------------------------------------------------------ */
+    @Override
     public void update(Observable o, Object arg) {
         if (!this.exceptValue.equals(model.getExcept())) {
@@ -308,6 +309,7 @@
     /* ------------------------------------------------------------------------------------ */
     class StandardNonStandardChangeHandler implements ItemListener {
+        @Override
         public void itemStateChanged(ItemEvent e) {
-            if (rbNonStandardException.isSelected()){
+            if (rbNonStandardException.isSelected()) {
                 setEnabledNonStandardInputPanel(true);
                 setEnabledStandardInputPanel(false);
@@ -321,12 +323,13 @@
         }
     }
-    
+
     class StandardVehicleTypeChangeListener implements ItemListener {
         private boolean enabled = true;
-        
-        public void setEnabled(boolean enabled){
+
+        public void setEnabled(boolean enabled) {
             this.enabled = enabled;
         }
-        
+
+        @Override
         public void itemStateChanged(ItemEvent e) {
             if (!enabled) return;
@@ -335,9 +338,9 @@
             exceptValue.setVehicleException("hgv", cbHgv.isSelected());
             exceptValue.setVehicleException("psv", cbPsv.isSelected());
-            exceptValue.setVehicleException("motorcar", cbMotorcar.isSelected());            
+            exceptValue.setVehicleException("motorcar", cbMotorcar.isSelected());
             model.setExcept(exceptValue);
         }
     }
-    
+
     class NonStandardVehicleTypesHandler implements ActionListener, FocusListener {
         public void persist() {
@@ -345,12 +348,16 @@
             model.setExcept(exceptValue);
         }
-        
+
+        @Override
         public void focusGained(FocusEvent e) {}
+
+        @Override
         public void focusLost(FocusEvent e) {
             persist();
         }
 
+        @Override
         public void actionPerformed(ActionEvent e) {
-            persist();          
+            persist();
         }
     }
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/ViaList.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/ViaList.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/ViaList.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.editor;
 
@@ -48,5 +49,5 @@
 public class ViaList extends JList<OsmPrimitive> {
 
-    //static private final Logger logger = Logger.getLogger(ViaList.class.getName());
+    //private static final Logger logger = Logger.getLogger(ViaList.class.getName());
 
     private ViaListModel model;
@@ -72,18 +73,20 @@
         setCellRenderer(new OsmPrimitivRenderer());
         setDragEnabled(true);
-        setTransferHandler(transferHandler =new ViaListTransferHandler(model));
+        setTransferHandler(transferHandler = new ViaListTransferHandler(model));
         setVisibleRowCount(4);
 
         actDelete = new DeleteAction();
         selectionModel.addListSelectionListener(actDelete);
-        registerKeyboardAction(actDelete, KeyStroke.getKeyStroke(KeyEvent.VK_DELETE,0), JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
+        registerKeyboardAction(actDelete, KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0), JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
 
         actMoveDown = new MoveDownAction();
         selectionModel.addListSelectionListener(actMoveDown);
-        registerKeyboardAction(actMoveDown, KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, KeyEvent.ALT_DOWN_MASK), JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
+        registerKeyboardAction(actMoveDown,
+                KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, KeyEvent.ALT_DOWN_MASK), JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
 
         actMoveUp = new MoveUpAction();
         selectionModel.addListSelectionListener(actMoveUp);
-        registerKeyboardAction(actMoveUp, KeyStroke.getKeyStroke(KeyEvent.VK_UP, KeyEvent.ALT_DOWN_MASK), JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
+        registerKeyboardAction(actMoveUp,
+                KeyStroke.getKeyStroke(KeyEvent.VK_UP, KeyEvent.ALT_DOWN_MASK), JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
 
         actCopy = new CopyAction();
@@ -103,5 +106,5 @@
         private List<Integer> selectedRowsMemento = null;
 
-        public ViaListTransferHandler(PrimitiveIdListProvider provider) {
+        ViaListTransferHandler(PrimitiveIdListProvider provider) {
             super(provider);
         }
@@ -121,14 +124,14 @@
                 // this is a drag operation on itself
                 int targetRow = getSelectedIndex();
-                if (targetRow <0) return true;
+                if (targetRow < 0) return true;
                 model.moveVias(selectedRowsMemento, targetRow);
             } else {
                 // this is a drag operation from another component
                 try {
-                    List<PrimitiveId> idsToAdd = (List<PrimitiveId>)t.getTransferData(PrimitiveIdTransferable.PRIMITIVE_ID_LIST_FLAVOR);
+                    List<PrimitiveId> idsToAdd = (List<PrimitiveId>) t.getTransferData(PrimitiveIdTransferable.PRIMITIVE_ID_LIST_FLAVOR);
                     model.insertVias(idsToAdd);
-                } catch(IOException e){
+                } catch (IOException e) {
                     e.printStackTrace();
-                } catch(UnsupportedFlavorException e){
+                } catch (UnsupportedFlavorException e) {
                     e.printStackTrace();
                 }
@@ -152,12 +155,13 @@
 
     class DeleteAction extends AbstractAction implements ListSelectionListener {
-        public DeleteAction() {
+        DeleteAction() {
             putValue(NAME, tr("Remove"));
             new ImageProvider("dialogs", "delete").getResource().attachImageIcon(this);
-            putValue(SHORT_DESCRIPTION,tr("Remove the currently selected vias"));
-            putValue(ACCELERATOR_KEY,KeyStroke.getKeyStroke(KeyEvent.VK_DELETE,0));
-            updateEnabledState();
-        }
-
+            putValue(SHORT_DESCRIPTION, tr("Remove the currently selected vias"));
+            putValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0));
+            updateEnabledState();
+        }
+
+        @Override
         public void valueChanged(ListSelectionEvent e) {
             updateEnabledState();
@@ -168,4 +172,5 @@
         }
 
+        @Override
         public void actionPerformed(ActionEvent e) {
             model.removeSelectedVias();
@@ -173,18 +178,19 @@
     }
 
-    class MoveDownAction extends AbstractAction implements ListSelectionListener{
-        public MoveDownAction(){
+    class MoveDownAction extends AbstractAction implements ListSelectionListener {
+        MoveDownAction() {
             putValue(NAME, tr("Move down"));
             putValue(SHORT_DESCRIPTION, tr("Move the selected vias down by one position"));
-            putValue(ACCELERATOR_KEY,KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, KeyEvent.ALT_DOWN_MASK));
+            putValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, KeyEvent.ALT_DOWN_MASK));
             new ImageProvider("dialogs", "movedown").getResource().attachImageIcon(this);
             updateEnabledState();
         }
 
+        @Override
         public void actionPerformed(ActionEvent e) {
             model.moveDown();
         }
 
-        public void updateEnabledState(){
+        public void updateEnabledState() {
             if (getSelectedIndex() < 0) {
                 setEnabled(false);
@@ -194,4 +200,5 @@
         }
 
+        @Override
         public void valueChanged(ListSelectionEvent e) {
             updateEnabledState();
@@ -199,18 +206,19 @@
     }
 
-    class MoveUpAction extends AbstractAction implements ListSelectionListener{
-        public MoveUpAction() {
+    class MoveUpAction extends AbstractAction implements ListSelectionListener {
+        MoveUpAction() {
             putValue(NAME, tr("Move up"));
             putValue(SHORT_DESCRIPTION, tr("Move the selected vias up by one position"));
-            putValue(ACCELERATOR_KEY,KeyStroke.getKeyStroke(KeyEvent.VK_UP, KeyEvent.ALT_DOWN_MASK));
+            putValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_UP, KeyEvent.ALT_DOWN_MASK));
             new ImageProvider("dialogs", "moveup").getResource().attachImageIcon(this);
             updateEnabledState();
         }
 
+        @Override
         public void actionPerformed(ActionEvent e) {
             model.moveUp();
         }
 
-        public void updateEnabledState(){
+        public void updateEnabledState() {
             if (getSelectedIndex() < 0) {
                 setEnabled(false);
@@ -220,4 +228,5 @@
         }
 
+        @Override
         public void valueChanged(ListSelectionEvent e) {
             updateEnabledState();
@@ -228,5 +237,5 @@
         private Action delegate;
 
-        public CopyAction(){
+        CopyAction() {
             putValue(NAME, tr("Copy"));
             putValue(SHORT_DESCRIPTION, tr("Copy the selected vias to the clipboard"));
@@ -236,4 +245,5 @@
         }
 
+        @Override
         public void actionPerformed(ActionEvent e) {
             delegate.actionPerformed(e);
@@ -244,4 +254,5 @@
         }
 
+        @Override
         public void valueChanged(ListSelectionEvent e) {
             updateEnabledState();
@@ -261,5 +272,5 @@
         }
 
-        public PasteAction(){
+        PasteAction() {
             putValue(NAME, tr("Paste"));
             putValue(SHORT_DESCRIPTION, tr("Insert ''via'' objects from the clipboard"));
@@ -274,4 +285,5 @@
         }
 
+        @Override
         public void actionPerformed(ActionEvent e) {
             delegate.actionPerformed(e);
@@ -280,5 +292,5 @@
 
     class ViaListPopupMenu extends JPopupMenu {
-        public ViaListPopupMenu() {
+        ViaListPopupMenu() {
             JMenuItem item = add(actCopy);
             item.setTransferHandler(transferHandler);
@@ -297,7 +309,7 @@
         @Override
         public void launch(MouseEvent evt) {
-            if (getSelectedIndex() <0) {
+            if (getSelectedIndex() < 0) {
                 int idx = locationToIndex(evt.getPoint());
-                if (idx >=0) {
+                if (idx >= 0) {
                     setSelectedIndex(idx);
                 }
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/ViaListModel.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/ViaListModel.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/ViaListModel.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.editor;
 
@@ -20,16 +21,15 @@
 /**
  * ViaListModel is a model for the list of 'via' objects of a turn restriction.
- * 
+ *
  */
-public class ViaListModel extends AbstractListModel<OsmPrimitive> implements PrimitiveIdListProvider, Observer{
-    //static private final Logger logger = Logger.getLogger(ViaListModel.class.getName());
-    
+public class ViaListModel extends AbstractListModel<OsmPrimitive> implements PrimitiveIdListProvider, Observer {
+
     private DefaultListSelectionModel selectionModel;
     private final ArrayList<OsmPrimitive> vias = new ArrayList<>();
     private TurnRestrictionEditorModel model;
-    
-    /**
-     * Constructor 
-     * 
+
+    /**
+     * Constructor
+     *
      * @param model the turn restriction editor model. Must not be null.
      * @param selectionModel the selection model. Must not be null.
@@ -48,10 +48,10 @@
     /**
      * Replies the list of currently selected vias
-     * 
+     *
      * @return the list of currently selected vias
      */
     public List<OsmPrimitive> getSelectedVias() {
         ArrayList<OsmPrimitive> ret = new ArrayList<>();
-        for (int i=0; i < getSize(); i++) {
+        for (int i = 0; i < getSize(); i++) {
             if (selectionModel.isSelectedIndex(i)) {
                 ret.add(vias.get(i));
@@ -60,14 +60,14 @@
         return ret;
     }
-    
+
     /**
      * Sets the collection of currently selected vias
-     * 
-     *  @param vias a collection of vias 
+     *
+     *  @param vias a collection of vias
      */
     public void setSelectedVias(Collection<OsmPrimitive> vias) {
         selectionModel.clearSelection();
         if (vias == null) return;
-        for(OsmPrimitive via: vias) {
+        for (OsmPrimitive via: vias) {
             int idx = this.vias.indexOf(via);
             if (idx < 0) continue;
@@ -75,13 +75,13 @@
         }
     }
-    
-    /**
-     * Replies the list of selected rows 
-     * 
+
+    /**
+     * Replies the list of selected rows
+     *
      * @return the list of selected rows
      */
     public List<Integer> getSelectedRows() {
         ArrayList<Integer> ret = new ArrayList<>();
-        for (int i=0; i < getSize(); i++) {
+        for (int i = 0; i < getSize(); i++) {
             if (selectionModel.isSelectedIndex(i)) {
                 ret.add(i);
@@ -90,9 +90,9 @@
         return ret;
     }
-    
+
     protected List<Integer> moveUp(List<Integer> rows, int targetRow) {
         List<Integer> ret = new ArrayList<>(rows.size());
         int delta = rows.get(0) - targetRow;
-        for(int row: rows) {
+        for (int row: rows) {
             OsmPrimitive via = vias.remove(row);
             vias.add(row - delta, via);
@@ -101,9 +101,9 @@
         return ret;
     }
-    
+
     protected List<Integer> moveDown(List<Integer> rows, int targetRow) {
         List<Integer> ret = new ArrayList<>(rows.size());
         int delta = targetRow - rows.get(0);
-        for(int i = rows.size()-1; i >=0; i--) {
+        for (int i = rows.size()-1; i >= 0; i--) {
             int row = rows.get(i);
             OsmPrimitive via = vias.remove(row);
@@ -113,8 +113,8 @@
         return ret;
     }
-    
-    public void moveVias(List<Integer> selectedRows, int targetRow){
+
+    public void moveVias(List<Integer> selectedRows, int targetRow) {
         if (selectedRows == null) return;
-        if (selectedRows.size() == 1){
+        if (selectedRows.size() == 1) {
             int sourceRow = selectedRows.get(0);
             if (sourceRow == targetRow) return;
@@ -124,12 +124,12 @@
             selectionModel.setSelectionInterval(targetRow, targetRow);
             return;
-        } 
+        }
         int min = selectedRows.get(0);
         int max = selectedRows.get(selectedRows.size()-1);
         if (targetRow < min) {
             selectedRows = moveUp(selectedRows, targetRow);
-        } else if (targetRow == min){
+        } else if (targetRow == min) {
             // do nothing
-        } else if (targetRow - min < getSize() - max){
+        } else if (targetRow - min < getSize() - max) {
             int delta = Math.min(targetRow - min, getSize()-1 - max);
             targetRow = min + delta;
@@ -137,12 +137,12 @@
                 selectedRows = moveDown(selectedRows, targetRow);
             }
-        } 
+        }
         fireContentsChanged(this, 0, getSize());
         selectionModel.clearSelection();
-        for(int row: selectedRows) {
+        for (int row: selectedRows) {
             selectionModel.addSelectionInterval(row, row);
-        }       
-    }
-    
+        }
+    }
+
     /**
      * Move the currently selected vias up by one position
@@ -162,8 +162,8 @@
         moveVias(sel, sel.get(sel.size()-1)+1);
     }
-    
-    /**
-     * Inserts a list of OSM objects given by OSM primitive ids. 
-     * 
+
+    /**
+     * Inserts a list of OSM objects given by OSM primitive ids.
+     *
      * @param idsToInsert the ids of the objects to insert
      */
@@ -172,7 +172,7 @@
         List<OsmPrimitive> primitives = new ArrayList<>(idsToInsert.size());
         DataSet ds = model.getLayer().data;
-        for(PrimitiveId id: idsToInsert){
+        for (PrimitiveId id: idsToInsert) {
             OsmPrimitive p = ds.getPrimitiveById(id);
-            if (p == null){
+            if (p == null) {
                 System.out.println(tr("Failed to retrieve OSM object with id {0} from dataset {1}. Cannot add it as ''via''.", id, ds));
                 continue;
@@ -180,5 +180,5 @@
             primitives.add(p);
         }
-        int targetRow = Math.max(selectionModel.getMinSelectionIndex(),0);
+        int targetRow = Math.max(selectionModel.getMinSelectionIndex(), 0);
         List<OsmPrimitive> newVias = new ArrayList<>(vias);
         newVias.addAll(targetRow, primitives);
@@ -186,7 +186,7 @@
         fireContentsChanged(this, 0, getSize());
         selectionModel.clearSelection();
-        for(int i=targetRow; i< targetRow + primitives.size();i++) {
+        for (int i = targetRow; i < targetRow + primitives.size(); i++) {
             selectionModel.addSelectionInterval(i, i);
-        }           
+        }
     }
 
@@ -197,5 +197,5 @@
         ArrayList<OsmPrimitive> newVias = new ArrayList<>(vias);
         int j = 0;
-        for(int i=0; i< getSize();i++){
+        for (int i = 0; i < getSize(); i++) {
             if (!selectionModel.isSelectedIndex(i)) continue;
             newVias.remove(i-j);
@@ -205,28 +205,31 @@
         model.setVias(newVias);
     }
-    
+
     /**
      * Refreshes the list of 'vias' in this model with the current list of
-     * vias from the turn restriction model. 
+     * vias from the turn restriction model.
      */
     protected void refresh() {
         List<OsmPrimitive> sel = getSelectedVias();
         vias.clear();
-        vias.addAll(model.getVias());       
+        vias.addAll(model.getVias());
         fireContentsChanged(this, 0, getSize());
         setSelectedVias(sel);
     }
 
+    @Override
     public OsmPrimitive getElementAt(int index) {
         return vias.get(index);
     }
 
+    @Override
     public int getSize() {
         return vias.size();
     }
-    
+
     /* ----------------------------------------------------------------------- */
     /* interface PrimitiveIdListProvider                                       */
     /* ----------------------------------------------------------------------- */
+    @Override
     public List<PrimitiveId> getSelectedPrimitiveIds() {
         ArrayList<PrimitiveId> ids = new ArrayList<>();
@@ -240,6 +243,7 @@
     /* interface Observer                                                      */
     /* ----------------------------------------------------------------------- */
+    @Override
     public void update(Observable o, Object arg) {
         refresh();
-    }   
+    }
 }
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/AbstractTurnRestrictionsListView.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/AbstractTurnRestrictionsListView.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/AbstractTurnRestrictionsListView.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.list;
 
@@ -10,5 +11,5 @@
 /**
  * The abstract base class for two views of turn restriction lists.
- * 
+ *
  * @see TurnRestrictionsInSelectionView
  * @see TurnRestrictionsInDatasetView
@@ -18,23 +19,23 @@
     protected TurnRestrictionsListModel model;
     protected JList<Relation> lstTurnRestrictions;
-    
-    public TurnRestrictionsListModel getModel(){
+
+    public TurnRestrictionsListModel getModel() {
         return model;
     }
-    
+
     public JList<Relation> getList() {
         return lstTurnRestrictions;
     }
-    
+
     public void addListSelectionListener(ListSelectionListener listener) {
         lstTurnRestrictions.addListSelectionListener(listener);
     }
-     
+
     public void removeListSelectionListener(ListSelectionListener listener) {
         lstTurnRestrictions.addListSelectionListener(listener);
     }
-    
-    public void initIconSetFromPreferences(Preferences prefs){
-        TurnRestrictionCellRenderer renderer = (TurnRestrictionCellRenderer)lstTurnRestrictions.getCellRenderer();
+
+    public void initIconSetFromPreferences(Preferences prefs) {
+        TurnRestrictionCellRenderer renderer = (TurnRestrictionCellRenderer) lstTurnRestrictions.getCellRenderer();
         renderer.initIconSetFromPreferences(prefs);
     }
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionCellRenderer.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionCellRenderer.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionCellRenderer.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.list;
 
@@ -34,14 +35,13 @@
 /**
  * This is a cell renderer for turn restrictions.
- * 
+ *
  * It can be used a cell renderer in lists of turn restrictions and as cell renderer in
- * {@link JTable}s displaying turn restrictions. 
- * 
+ * {@link JTable}s displaying turn restrictions.
+ *
  */
-public class TurnRestrictionCellRenderer extends JPanel implements ListCellRenderer<Relation>, TableCellRenderer{
-    //static private final Logger logger = Logger.getLogger(TurnRestrictionCellRenderer.class.getName());
-    
+public class TurnRestrictionCellRenderer extends JPanel implements ListCellRenderer<Relation>, TableCellRenderer {
+
     /** the names of restriction types */
-    static private Set<String> RESTRICTION_TYPES = new HashSet<>(
+    private static Set<String> RESTRICTION_TYPES = new HashSet<>(
             Arrays.asList(new String[] {
                     "no_left_turn",
@@ -54,5 +54,5 @@
             })
     );
-    
+
     /** components used to render the turn restriction */
     private JLabel icon;
@@ -60,5 +60,5 @@
     private JLabel to;
     private String iconSet = "set-a";
-    
+
     public TurnRestrictionCellRenderer() {
         build();
@@ -68,6 +68,6 @@
      * Replies true if {@code restrictionType} is a valid restriction
      * type.
-     * 
-     * @param restrictionType the restriction type 
+     *
+     * @param restrictionType the restriction type
      * @return true if {@code restrictionType} is a valid restriction
      * type
@@ -78,19 +78,19 @@
         return RESTRICTION_TYPES.contains(restrictionType);
     }
-    
-    /**
-     * Builds the icon name for a given restriction type 
-     * 
-     * @param restrictionType the restriction type 
-     * @return the icon name 
+
+    /**
+     * Builds the icon name for a given restriction type
+     *
+     * @param restrictionType the restriction type
+     * @return the icon name
      */
     protected String buildImageName(String restrictionType) {
         return "types/" + iconSet + "/" + restrictionType;
     }
-    
-    /**
-     * Replies the icon for a given restriction type 
-     * @param restrictionType the restriction type 
-     * @return the icon 
+
+    /**
+     * Replies the icon for a given restriction type
+     * @param restrictionType the restriction type
+     * @return the icon
      */
     protected ImageIcon getIcon(String restrictionType) {
@@ -100,21 +100,21 @@
         return ImageProvider.get(buildImageName(restrictionType));
     }
-    
-    /**
-     * Builds the UI used to render turn restrictions 
+
+    /**
+     * Builds the UI used to render turn restrictions
      */
     protected void build() {
         setLayout(new GridBagLayout());
         GridBagConstraints gc = new GridBagConstraints();
-        
-        // the turn restriction icon        
+
+        // the turn restriction icon
         gc.fill = GridBagConstraints.HORIZONTAL;
         gc.weightx = 0.0;
         gc.gridheight = 2;
         gc.anchor = GridBagConstraints.CENTER;
-        gc.insets = new Insets(0,0,2,2);
+        gc.insets = new Insets(0, 0, 2, 2);
         add(icon = new JLabel(), gc);
-        
-        
+
+
         // the name of the way with role "from"
         gc.anchor = GridBagConstraints.NORTHWEST;
@@ -122,10 +122,10 @@
         gc.gridheight = 1;
         gc.weightx = 0.0;
-        add(new JMultilineLabel("<html><strong>" + trc("turnrestrictions","From:") + "</strong></html>"), gc);
-        
+        add(new JMultilineLabel("<html><strong>" + trc("turnrestrictions", "From:") + "</strong></html>"), gc);
+
         gc.gridx = 2;
-        gc.weightx = 1.0; 
+        gc.weightx = 1.0;
         add(from = new JLabel(), gc);
-        
+
         // the name of the way with role "to"
         gc.anchor = GridBagConstraints.NORTHWEST;
@@ -133,6 +133,6 @@
         gc.gridy = 1;
         gc.weightx = 0.0;
-        add(new JMultilineLabel("<html><strong>" + trc("turnrestriction", "To:")  + "</strong></html>"), gc);
-        
+        add(new JMultilineLabel("<html><strong>" + trc("turnrestriction", "To:") + "</strong></html>"), gc);
+
         gc.gridx = 2;
         gc.weightx = 1.0;
@@ -141,6 +141,6 @@
 
     /**
-     * Renders the icon for the turn restriction  
-     * 
+     * Renders the icon for the turn restriction
+     *
      * @param tr the turn restriction
      */
@@ -152,18 +152,18 @@
     /**
      * Replies a way participating in this turn restriction in a given role
-     * 
-     * @param tr the turn restriction 
+     *
+     * @param tr the turn restriction
      * @param role the role (either "from" or "to")
      * @return the participating way; null, if no way is participating in this role
      */
-    private Way getParticipatingWay(Relation tr, String role){
-        for(RelationMember rm: tr.getMembers()){
+    private Way getParticipatingWay(Relation tr, String role) {
+        for (RelationMember rm: tr.getMembers()) {
             if (rm.getRole().trim().toLowerCase().equals(role) && rm.getType().equals(OsmPrimitiveType.WAY)) {
-                return (Way)rm.getMember();
+                return (Way) rm.getMember();
             }
         }
         return null;
     }
-    
+
     protected void renderFrom(Relation tr) {
         Way from = getParticipatingWay(tr, "from");
@@ -172,5 +172,5 @@
             this.from.setText(tr("no participating way with role ''from''"));
             return;
-        } 
+        }
         this.from.setText(DefaultNameFormatter.getInstance().format(from));
     }
@@ -182,5 +182,5 @@
             this.to.setText(tr("no participating way with role ''to''"));
             return;
-        } 
+        }
         this.to.setText(DefaultNameFormatter.getInstance().format(to));
     }
@@ -189,5 +189,5 @@
      * Renders the foreground and background color depending on whether
      * the turn restriction is selected
-     * 
+     *
      * @param isSelected true if the turn restriction is selected; false,
      * otherwise
@@ -207,5 +207,5 @@
         this.from.setBackground(bg);
         this.to.setBackground(bg);
-        
+
         setForeground(fg);
         this.icon.setForeground(fg);
@@ -217,9 +217,9 @@
      * Initializes the set of icons used from the preference key
      * {@link PreferenceKeys#ROAD_SIGNS}.
-     * 
-     * @param prefs the JOSM preferences 
-     */
-    public void initIconSetFromPreferences(Preferences prefs){
-        
+     *
+     * @param prefs the JOSM preferences
+     */
+    public void initIconSetFromPreferences(Preferences prefs) {
+
         iconSet = prefs.get(PreferenceKeys.ROAD_SIGNS, "set-a");
         iconSet = iconSet.trim().toLowerCase();
@@ -228,16 +228,17 @@
         }
     }
-    
+
     /* ---------------------------------------------------------------------------------- */
     /* interface ListCellRenderer                                                         */
     /* ---------------------------------------------------------------------------------- */
+    @Override
     public Component getListCellRendererComponent(JList<? extends Relation> list, Relation value,
             int index, boolean isSelected, boolean cellHasFocus) {
 
         renderColor(isSelected);
-        Relation tr = (Relation)value;
+        Relation tr = value;
         renderIcon(tr);
         renderFrom(tr);
-        renderTo(tr);       
+        renderTo(tr);
         return this;
     }
@@ -246,12 +247,13 @@
     /* interface TableCellRenderer                                                        */
     /* ---------------------------------------------------------------------------------- */
+    @Override
     public Component getTableCellRendererComponent(JTable table, Object value,
             boolean isSelected, boolean hasFocus, int row, int column) {
-        renderColor(isSelected);        
-        Relation tr = (Relation)value;
+        renderColor(isSelected);
+        Relation tr = (Relation) value;
         renderIcon(tr);
         renderFrom(tr);
-        renderTo(tr);       
+        renderTo(tr);
         return this;
-    }   
+    }
 }
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsInDatasetListModel.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsInDatasetListModel.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsInDatasetListModel.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.list;
 
@@ -50,7 +51,7 @@
         List<Relation> ret = new LinkedList<>();
         if (primitives == null) return ret;
-        for(OsmPrimitive p: primitives){
+        for (OsmPrimitive p: primitives) {
             if (!isTurnRestriction(p)) continue;
-            ret.add((Relation)p);
+            ret.add((Relation) p);
         }
         return ret;
@@ -111,8 +112,8 @@
         if (!turnRestrictions.isEmpty()) {
             List<Relation> sel = getSelectedTurnRestrictions();
-            for(Relation tr: turnRestrictions) {
+            for (Relation tr: turnRestrictions) {
                 // enforce a repaint of the respective turn restriction
                 int idx = getTurnRestrictionIndex(tr);
-                fireContentsChanged(this, idx,idx);
+                fireContentsChanged(this, idx, idx);
             }
             setSelectedTurnRestrictions(sel);
@@ -125,8 +126,8 @@
         if (!turnRestrictions.isEmpty()) {
             List<Relation> sel = getSelectedTurnRestrictions();
-            for(Relation tr: turnRestrictions) {
+            for (Relation tr: turnRestrictions) {
                 // enforce a repaint of the respective turn restriction
                 int idx = getTurnRestrictionIndex(tr);
-                fireContentsChanged(this, idx,idx);
+                fireContentsChanged(this, idx, idx);
             }
             setSelectedTurnRestrictions(sel);
@@ -136,6 +137,8 @@
     @Override
     public void wayNodesChanged(WayNodesChangedEvent event) {/* ignore */}
+
     @Override
     public void nodeMoved(NodeMovedEvent event) {/* ignore */}
+
     @Override
     public void otherDatasetChange(AbstractDatasetChangedEvent event) {/* ignore */}
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsInDatasetView.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsInDatasetView.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsInDatasetView.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.list;
 
@@ -31,6 +32,6 @@
 
     protected void registerAsListener() {
-        Main.getLayerManager().addActiveLayerChangeListener((ActiveLayerChangeListener)model);
-        DatasetEventManager.getInstance().addDatasetListener((DataSetListener)model, FireMode.IN_EDT);
+        Main.getLayerManager().addActiveLayerChangeListener((ActiveLayerChangeListener) model);
+        DatasetEventManager.getInstance().addDatasetListener((DataSetListener) model, FireMode.IN_EDT);
         if (Main.getLayerManager().getEditLayer() != null) {
             model.setTurnRestrictions(Main.getLayerManager().getEditLayer().data.getRelations());
@@ -39,6 +40,6 @@
 
     protected void unregisterAsListener() {
-        Main.getLayerManager().removeActiveLayerChangeListener((ActiveLayerChangeListener)model);
-        DatasetEventManager.getInstance().removeDatasetListener((DataSetListener)model);
+        Main.getLayerManager().removeActiveLayerChangeListener((ActiveLayerChangeListener) model);
+        DatasetEventManager.getInstance().removeDatasetListener((DataSetListener) model);
     }
 
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsInSelectionListModel.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsInSelectionListModel.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsInSelectionListModel.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.list;
 
@@ -19,6 +20,6 @@
  * objects in the current selection.
  */
-public class TurnRestrictionsInSelectionListModel extends TurnRestrictionsListModel implements ActiveLayerChangeListener, SelectionChangedListener {
-    //private static final Logger logger = Logger.getLogger(TurnRestrictionsInSelectionListModel.class.getName());
+public class TurnRestrictionsInSelectionListModel extends TurnRestrictionsListModel
+    implements ActiveLayerChangeListener, SelectionChangedListener {
 
     public TurnRestrictionsInSelectionListModel(
@@ -39,5 +40,5 @@
             for (OsmPrimitive parent: p.getReferrers()) {
                 if (isTurnRestriction(parent))
-                    turnRestrictions.add((Relation)parent);
+                    turnRestrictions.add((Relation) parent);
             }
         }
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsInSelectionView.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsInSelectionView.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsInSelectionView.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.list;
 
@@ -36,8 +37,8 @@
 
     protected void registerAsListener() {
-        Main.getLayerManager().addActiveLayerChangeListener((ActiveLayerChangeListener)model);
-        SelectionEventManager.getInstance().addSelectionListener((SelectionChangedListener)model, FireMode.IN_EDT_CONSOLIDATED);
-        TurnRestrictionsInSelectionListModel m = (TurnRestrictionsInSelectionListModel)model;
-        if (Main.getLayerManager().getEditLayer() != null){
+        Main.getLayerManager().addActiveLayerChangeListener((ActiveLayerChangeListener) model);
+        SelectionEventManager.getInstance().addSelectionListener((SelectionChangedListener) model, FireMode.IN_EDT_CONSOLIDATED);
+        TurnRestrictionsInSelectionListModel m = (TurnRestrictionsInSelectionListModel) model;
+        if (Main.getLayerManager().getEditLayer() != null) {
             m.initFromSelection(Main.getLayerManager().getEditLayer().data.getSelected());
         } else {
@@ -47,6 +48,6 @@
 
     protected void unregisterAsListener() {
-        Main.getLayerManager().removeActiveLayerChangeListener((ActiveLayerChangeListener)model);
-        SelectionEventManager.getInstance().removeSelectionListener((SelectionChangedListener)model);
+        Main.getLayerManager().removeActiveLayerChangeListener((ActiveLayerChangeListener) model);
+        SelectionEventManager.getInstance().removeSelectionListener((SelectionChangedListener) model);
     }
 
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsListDialog.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsListDialog.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsListDialog.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.list;
 
@@ -51,6 +52,5 @@
  *
  */
-public class TurnRestrictionsListDialog extends ToggleDialog{
-    //private static final Logger logger = Logger.getLogger(TurnRestrictionsListDialog.class.getName());
+public class TurnRestrictionsListDialog extends ToggleDialog {
 
     /** checkbox for switching between the two list views */
@@ -97,5 +97,5 @@
      */
     protected void build() {
-        JPanel pnl = new JPanel(new FlowLayout(FlowLayout.LEFT,0,0));
+        JPanel pnl = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
         pnl.setBorder(null);
         pnl.add(cbInSelectionOnly = new JCheckBox(tr("Only participating in selection")));
@@ -104,7 +104,7 @@
          + "Deselect to display all turn restrictions in the current data set.</html>"));
 
-        pnlContent = new JPanel(new BorderLayout(0,0));
+        pnlContent = new JPanel(new BorderLayout(0, 0));
         pnlContent.setBorder(null);
-        pnlContent.add(pnl,  BorderLayout.NORTH);
+        pnlContent.add(pnl, BorderLayout.NORTH);
 
         actNew = new NewAction();
@@ -165,5 +165,5 @@
                 pnlContent.remove(currentListView);
             }
-            pnlContent.add(view,BorderLayout.CENTER);
+            pnlContent.add(view, BorderLayout.CENTER);
             currentListView = view;
             view.addListSelectionListener(actEdit);
@@ -197,11 +197,12 @@
      *
      */
-    class EditAction extends AbstractAction implements ListSelectionListener{
-        public EditAction() {
-            putValue(SHORT_DESCRIPTION,tr("Open an editor for the selected turn restriction"));
+    class EditAction extends AbstractAction implements ListSelectionListener {
+        EditAction() {
+            putValue(SHORT_DESCRIPTION, tr("Open an editor for the selected turn restriction"));
             new ImageProvider("dialogs", "edit").getResource().attachImageIcon(this, true);
             putValue(NAME, tr("Edit"));
             setEnabled(false);
         }
+
         protected Collection<RelationMember> getMembersForCurrentSelection(Relation r) {
             Collection<RelationMember> members = new HashSet<>();
@@ -226,7 +227,7 @@
             } else {
                 editor = new TurnRestrictionEditor(
-                        TurnRestrictionsListDialog.this, layer,toEdit);
+                        TurnRestrictionsListDialog.this, layer, toEdit);
                 manager.positionOnScreen(editor);
-                manager.register(layer, toEdit,editor);
+                manager.register(layer, toEdit, editor);
                 editor.setVisible(true);
             }
@@ -243,5 +244,5 @@
 
         public void updateEnabledState() {
-            setEnabled(currentListView!= null && currentListView.getModel().getSelectedTurnRestrictions().size() == 1);
+            setEnabled(currentListView != null && currentListView.getModel().getSelectedTurnRestrictions().size() == 1);
         }
 
@@ -259,6 +260,6 @@
         class AbortException extends Exception {}
 
-        public DeleteAction() {
-            putValue(SHORT_DESCRIPTION,tr("Delete the selected turn restriction"));
+        DeleteAction() {
+            putValue(SHORT_DESCRIPTION, tr("Delete the selected turn restriction"));
             new ImageProvider("dialogs", "delete").getResource().attachImageIcon(this, true);
             putValue(NAME, tr("Delete"));
@@ -299,6 +300,6 @@
      */
      class NewAction extends AbstractAction implements ActiveLayerChangeListener {
-        public NewAction() {
-            putValue(SHORT_DESCRIPTION,tr("Create a new turn restriction"));
+        NewAction() {
+            putValue(SHORT_DESCRIPTION, tr("Create a new turn restriction"));
             new ImageProvider("new").getResource().attachImageIcon(this, true);
             putValue(NAME, tr("New"));
@@ -339,6 +340,6 @@
         class AbortException extends Exception {}
 
-        public SelectSelectedTurnRestrictions() {
-            putValue(SHORT_DESCRIPTION,tr("Set the current JOSM selection to the selected turn restrictions"));
+        SelectSelectedTurnRestrictions() {
+            putValue(SHORT_DESCRIPTION, tr("Set the current JOSM selection to the selected turn restrictions"));
             new ImageProvider("selectall").getResource().attachImageIcon(this);
             putValue(NAME, tr("Select in current data layer"));
@@ -351,5 +352,5 @@
             List<Relation> toSelect = currentListView.getModel().getSelectedTurnRestrictions();
             if (toSelect.isEmpty()) return;
-            OsmDataLayer layer= Main.getLayerManager().getEditLayer();
+            OsmDataLayer layer = Main.getLayerManager().getEditLayer();
             if (layer == null) return;
             layer.data.setSelected(toSelect);
@@ -374,6 +375,6 @@
         class AbortException extends Exception {}
 
-        public ZoomToAction() {
-            putValue(SHORT_DESCRIPTION,tr("Zoom to the currently selected turn restrictions"));
+        ZoomToAction() {
+            putValue(SHORT_DESCRIPTION, tr("Zoom to the currently selected turn restrictions"));
             new ImageProvider("dialogs/autoscale/selection").getResource().attachImageIcon(this);
             putValue(NAME, tr("Zoom to"));
@@ -386,5 +387,5 @@
             List<Relation> toSelect = currentListView.getModel().getSelectedTurnRestrictions();
             if (toSelect.isEmpty()) return;
-            OsmDataLayer layer= Main.getLayerManager().getEditLayer();
+            OsmDataLayer layer = Main.getLayerManager().getEditLayer();
             if (layer == null) return;
             layer.data.setSelected(toSelect);
@@ -412,5 +413,5 @@
             if (lst.getSelectedIndices().length == 0) {
                 int idx = lst.locationToIndex(evt.getPoint());
-                if (idx >=0) {
+                if (idx >= 0) {
                     lst.getSelectionModel().addSelectionInterval(idx, idx);
                 }
@@ -426,5 +427,5 @@
      */
     class TurnRestrictionsPopupMenu extends JPopupMenu {
-        public TurnRestrictionsPopupMenu() {
+        TurnRestrictionsPopupMenu() {
             add(actNew);
             add(actEdit);
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsListModel.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsListModel.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsListModel.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.list;
 
@@ -19,5 +20,5 @@
 /**
  * This is a list model for a list of turn restrictions.
- * 
+ *
  */
 public class TurnRestrictionsListModel extends AbstractListModel<Relation> {
@@ -27,5 +28,5 @@
     /**
      * Creates the model
-     * 
+     *
      * @param selectionModel the selection model used in the turn restriction list
      */
@@ -36,6 +37,6 @@
     /**
      * Replies the turn restriction at position {@code idx} in the list.
-     * 
-     * @param idx the index 
+     *
+     * @param idx the index
      * @return the turn restriction at position {@code idx} in the list.
      */
@@ -45,5 +46,5 @@
 
     /**
-     * Sorts the turn restrictions in this model 
+     * Sorts the turn restrictions in this model
      */
     public void sort() {
@@ -53,4 +54,5 @@
                     NameFormatter formatter = DefaultNameFormatter.getInstance();
 
+                    @Override
                     public int compare(Relation r1, Relation r2) {
                         return r1.getDisplayName(formatter).compareTo(r2.getDisplayName(formatter));
@@ -63,10 +65,10 @@
         return !r.isDeleted() && r.isVisible() && !r.isIncomplete();
     }
-    
+
     /**
      * Replies true if the primitive {@code primitive} represents
-     * an OSM turn restriction.  
-     * 
-     * @param primitive the primitive 
+     * an OSM turn restriction.
+     *
+     * @param primitive the primitive
      * @return true if the primitive {@code primitive} represents
      * an OSM turn restriction; false, otherwise
@@ -74,21 +76,21 @@
     protected boolean isTurnRestriction(OsmPrimitive primitive) {
         if (primitive == null) return false;
-        if (! (primitive instanceof Relation)) return false;
+        if (!(primitive instanceof Relation)) return false;
         String type = primitive.get("type");
-        if (type == null || ! type.equals("restriction")) return false;
+        if (type == null || !type.equals("restriction")) return false;
         return true;
     }
-    
+
     /**
      * Populates the model with the turn restrictions in {@code turnrestrictions}.
-     * 
-     * @param turnrestrictions the turn restrictions 
+     *
+     * @param turnrestrictions the turn restrictions
      */
     public void setTurnRestrictions(Collection<Relation> turnrestrictions) {
-        List<Relation> sel =  getSelectedTurnRestrictions();
+        List<Relation> sel = getSelectedTurnRestrictions();
         this.turnrestrictions.clear();
         if (turnrestrictions == null) {
             selectionModel.clearSelection();
-            fireContentsChanged(this,0,getSize());
+            fireContentsChanged(this, 0, getSize());
             return;
         }
@@ -113,9 +115,9 @@
         boolean added = false;
         for (OsmPrimitive p: addedPrimitives) {
-            if (! isTurnRestriction(p)) {
-                continue;
-            }
-
-            Relation r = (Relation)p;
+            if (!isTurnRestriction(p)) {
+                continue;
+            }
+
+            Relation r = (Relation) p;
             if (!isValid(r)) continue;
             if (turnrestrictions.contains(r)) {
@@ -144,7 +146,7 @@
         for (OsmPrimitive p: removedPrimitives) {
             if (!isTurnRestriction(p)) continue;
-            removedTurnRestrictions.add((Relation)p);
-        }
-        if (removedTurnRestrictions.isEmpty())return;
+            removedTurnRestrictions.add((Relation) p);
+        }
+        if (removedTurnRestrictions.isEmpty()) return;
         int size = turnrestrictions.size();
         turnrestrictions.removeAll(removedTurnRestrictions);
@@ -157,8 +159,10 @@
     }
 
+    @Override
     public Relation getElementAt(int index) {
         return turnrestrictions.get(index);
     }
 
+    @Override
     public int getSize() {
         return turnrestrictions.size();
@@ -173,5 +177,5 @@
     public List<Relation> getSelectedNonNewRelations() {
         ArrayList<Relation> ret = new ArrayList<>();
-        for (int i=0; i<getSize();i++) {
+        for (int i = 0; i < getSize(); i++) {
             if (!selectionModel.isSelectedIndex(i)) {
                 continue;
@@ -193,5 +197,5 @@
     public List<Relation> getSelectedTurnRestrictions() {
         ArrayList<Relation> ret = new ArrayList<>();
-        for (int i=0; i<getSize();i++) {
+        for (int i = 0; i < getSize(); i++) {
             if (!selectionModel.isSelectedIndex(i)) {
                 continue;
@@ -213,13 +217,13 @@
         for (Relation r: sel) {
             int i = turnrestrictions.indexOf(r);
-            if (i<0) {
-                continue;
-            }
-            selectionModel.addSelectionInterval(i,i);
-        }
-    }
-
-    /**
-     * Returns the index of a turn restriction 
+            if (i < 0) {
+                continue;
+            }
+            selectionModel.addSelectionInterval(i, i);
+        }
+    }
+
+    /**
+     * Returns the index of a turn restriction
      *
      * @return index of relation (-1, if not found)
@@ -227,5 +231,5 @@
     public int getTurnRestrictionIndex(Relation tr) {
         int i = turnrestrictions.indexOf(tr);
-        if (i<0)return -1;
+        if (i < 0) return -1;
         return i;
     }
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/preferences/PreferenceEditor.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/preferences/PreferenceEditor.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/preferences/PreferenceEditor.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.preferences;
 
@@ -42,14 +43,12 @@
     /**
      * builds the panel with the sponsoring information
-     *
-     * @return
      */
     protected JPanel buildCreditPanel() {
         JPanel pnl = new JPanel(new GridBagLayout());
-        pnl.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+        pnl.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
         GridBagConstraints gc = new GridBagConstraints();
         gc.anchor = GridBagConstraints.NORTHWEST;
         gc.fill = GridBagConstraints.HORIZONTAL;
-        gc.insets = new Insets(0, 0,0, 5);
+        gc.insets = new Insets(0, 0, 0, 5);
         gc.weightx = 0.0;
         JLabel lbl = new JLabel();
@@ -59,5 +58,5 @@
         gc.gridx = 1;
         gc.weightx = 1.0;
-        HtmlPanel msg  =new HtmlPanel();
+        HtmlPanel msg = new HtmlPanel();
         msg.setText("<html><body>"
                 + tr("Development of the turn restriction plugin was sponsored "
@@ -101,9 +100,10 @@
         tp.add(buildCreditPanel());
         tp.setTitleAt(0, tr("Preferences"));
-        tp.setToolTipTextAt(0,tr("Configure the preferences for the turnrestrictions plugin"));
+        tp.setToolTipTextAt(0, tr("Configure the preferences for the turnrestrictions plugin"));
         tp.setTitleAt(1, tr("Sponsor"));
         mainPanel.add(tp, BorderLayout.CENTER);
     }
 
+    @Override
     public void addGui(PreferenceTabbedPane gui) {
         JPanel tab = gui.createPreferenceTab(this);
@@ -111,4 +111,5 @@
     }
 
+    @Override
     public boolean ok() {
         pnlIconPreferences.saveToPreferences(Main.pref);
@@ -124,4 +125,5 @@
         }
 
+        @Override
         public void hyperlinkUpdate(HyperlinkEvent e) {
             if (e.getEventType().equals(HyperlinkEvent.EventType.ACTIVATED)) {
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/preferences/PreferenceKeys.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/preferences/PreferenceKeys.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/preferences/PreferenceKeys.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.preferences;
 
@@ -6,5 +7,5 @@
 /**
  * Defines the preference keys used for preferences of the turnrestrictions
- * plugin 
+ * plugin
  *
  */
@@ -17,12 +18,12 @@
      *   <li><tt>set-b</tt> - the set of icons in the directory <tt>/images/types/set-b</tt></li>
      * </ul>
-     * 
+     *
      */
     String ROAD_SIGNS = "turnrestrictions.road-signs";
-    
+
     /**
      * Indicates whether the Basic Editor should include a widget for for displaying
      * and editing the via-objects of a turn restriction.
-     * 
+     *
      * Supported values are:
      * <ul>
@@ -32,5 +33,5 @@
      */
     String SHOW_VIAS_IN_BASIC_EDITOR = "turnrestrictions.show-vias-in-basic-editor";
-    
+
     /**
      * The shortcut which triggers creating a new or editing and existing turn
@@ -38,4 +39,4 @@
      * If missing, the default value "ctrl shift T" is assumed.
      */
-    String EDIT_SHORTCUT= "turnrestrictions.edit-shortcut";
+    String EDIT_SHORTCUT = "turnrestrictions.edit-shortcut";
 }
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/preferences/PreferencesPanel.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/preferences/PreferencesPanel.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/preferences/PreferencesPanel.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.preferences;
 
@@ -25,5 +26,5 @@
  * IconPreferencePanel allows to configure a set of road sign icons to be
  * used in the turnrestrictions plugin.
- * 
+ *
  */
 public class PreferencesPanel extends VerticallyScrollablePanel {
@@ -33,5 +34,5 @@
     private ButtonGroup bgIconSet;
     private JCheckBox cbShowViaListInBasicEditor;
-    
+
     protected JPanel buildShowViaListInBasicEditorPanel() {
         JPanel pnl = new JPanel(new GridBagLayout());
@@ -42,5 +43,5 @@
         gc.gridx = 0;
         gc.gridy = 0;
-        
+
         HtmlPanel msg = new HtmlPanel();
         msg.setText("<html><body>"
@@ -53,14 +54,12 @@
         );
         pnl.add(msg, gc);
-        
+
         gc.gridy++;
         pnl.add(cbShowViaListInBasicEditor = new JCheckBox(tr("Display and edit list of via-objects in the Basic Editor")), gc);
         return pnl;
     }
-    
+
     /**
      * Builds the panel for the icon set "set-a"
-     * 
-     * @return
      */
     protected JPanel buildSetAPanel() {
@@ -72,24 +71,22 @@
         gc.gridx = 0;
         gc.gridy = 0;
-        
-        pnl.add(rbSetA = new JRadioButton(tr("Road signs - Set A")),gc);
-        
+
+        pnl.add(rbSetA = new JRadioButton(tr("Road signs - Set A")), gc);
+
         JPanel icons = new JPanel(new FlowLayout(FlowLayout.LEFT));
-        for (TurnRestrictionType type: TurnRestrictionType.values()){
+        for (TurnRestrictionType type: TurnRestrictionType.values()) {
             JLabel lbl = new JLabel();
             icons.add(lbl);
-            lbl.setIcon(ImageProvider.get("types/set-a",type.getTagValue()));
-        }
-        
+            lbl.setIcon(ImageProvider.get("types/set-a", type.getTagValue()));
+        }
+
         gc.gridy = 1;
-        gc.insets = new Insets(0,20,0,0);
+        gc.insets = new Insets(0, 20, 0, 0);
         pnl.add(icons, gc);
-        return pnl;     
-    }
-    
+        return pnl;
+    }
+
     /**
      * Builds the panel for the icon set "set-b"
-     * 
-     * @return
      */
     protected JPanel buildSetBPanel() {
@@ -101,24 +98,22 @@
         gc.gridx = 0;
         gc.gridy = 0;
-        
-        pnl.add(rbSetB = new JRadioButton(tr("Road signs - Set B")),gc);
-        
+
+        pnl.add(rbSetB = new JRadioButton(tr("Road signs - Set B")), gc);
+
         JPanel icons = new JPanel(new FlowLayout(FlowLayout.LEFT));
-        for (TurnRestrictionType type: TurnRestrictionType.values()){
+        for (TurnRestrictionType type: TurnRestrictionType.values()) {
             JLabel lbl = new JLabel();
             icons.add(lbl);
-            lbl.setIcon(ImageProvider.get("types/set-b",type.getTagValue()));
-        }
-        
+            lbl.setIcon(ImageProvider.get("types/set-b", type.getTagValue()));
+        }
+
         gc.gridy = 1;
-        gc.insets = new Insets(0,20,0,0);
+        gc.insets = new Insets(0, 20, 0, 0);
         pnl.add(icons, gc);
-        return pnl;     
-    }
-    
+        return pnl;
+    }
+
     /**
      * Builds the message panel at the top
-     * 
-     * @return
      */
     protected JPanel buildMessagePanel() {
@@ -131,11 +126,9 @@
         return pnl;
     }
-    
+
     /**
      * Builds the UI
-     * 
-     * @return
-     */
-    protected void build() {            
+     */
+    protected void build() {
         setLayout(new GridBagLayout());
         GridBagConstraints gc = new GridBagConstraints();
@@ -145,5 +138,5 @@
         gc.gridx = 0;
         gc.gridy = 0;
-        
+
         add(buildMessagePanel(), gc);
         gc.gridy++;
@@ -152,5 +145,5 @@
         add(buildSetBPanel(), gc);
         gc.gridy++;
-        add(new JSeparator(), gc);      
+        add(new JSeparator(), gc);
         gc.gridy++;
         add(buildShowViaListInBasicEditorPanel(), gc);
@@ -158,52 +151,54 @@
         add(new JSeparator(), gc);
         gc.gridy++;
-        
+
         // filler - just grab remaining space
         gc.gridy++;
         gc.fill = GridBagConstraints.BOTH;
         gc.weighty = 1.0;
-        add(new JPanel(), gc);       
-        
+        add(new JPanel(), gc);
+
         bgIconSet = new ButtonGroup();
         bgIconSet.add(rbSetA);
         bgIconSet.add(rbSetB);
-        
-        setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
-    }
-    
+
+        setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
+    }
+
     /**
      * Initializes the UI from the current settings in the JOSM preferences
      * {@code prefs}
-     * 
-     * @param prefs the preferences 
-     */
-    public void initFromPreferences(Preferences prefs){
+     *
+     * @param prefs the preferences
+     */
+    public void initFromPreferences(Preferences prefs) {
         String set = prefs.get(PreferenceKeys.ROAD_SIGNS, "set-a");
-        if (! set.equals("set-a") && ! set.equals("set-b")) {
-            System.out.println(tr("Warning: the preference with key ''{0}'' has an unsupported value ''{1}''. Assuming the default value ''set-a''.", PreferenceKeys.ROAD_SIGNS, set));
+        if (!set.equals("set-a") && !set.equals("set-b")) {
+            System.out.println(
+                    tr("Warning: the preference with key ''{0}'' has an unsupported value ''{1}''. Assuming the default value ''set-a''.",
+                    PreferenceKeys.ROAD_SIGNS, set));
             set = "set-a";
         }
-        if (set.equals("set-a")){
+        if (set.equals("set-a")) {
             rbSetA.setSelected(true);
         } else {
             rbSetB.setSelected(true);
         }
-        
+
         boolean b = prefs.getBoolean(PreferenceKeys.SHOW_VIAS_IN_BASIC_EDITOR, false);
         cbShowViaListInBasicEditor.setSelected(b);
     }
-    
+
     /**
      * Saves the current settings to the JOSM preferences {@code prefs}.
-     * 
-     * @param prefs the preferences 
-     */
-    public void saveToPreferences(Preferences prefs){
+     *
+     * @param prefs the preferences
+     */
+    public void saveToPreferences(Preferences prefs) {
         prefs.put(PreferenceKeys.ROAD_SIGNS, rbSetA.isSelected() ? "set-a" : "set-b");
         prefs.put(PreferenceKeys.SHOW_VIAS_IN_BASIC_EDITOR, cbShowViaListInBasicEditor.isSelected());
     }
-    
+
     public PreferencesPanel() {
         build();
-    }   
+    }
 }
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/IdenticalTurnRestrictionLegsError.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/IdenticalTurnRestrictionLegsError.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/IdenticalTurnRestrictionLegsError.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.qa;
 
@@ -12,9 +13,9 @@
 /**
  * Issue when the 'from' and 'to' leg are identical.
- * 
+ *
  */
-public class IdenticalTurnRestrictionLegsError extends Issue{
+public class IdenticalTurnRestrictionLegsError extends Issue {
     private OsmPrimitive leg;
-    
+
     public IdenticalTurnRestrictionLegsError(IssuesModel parent, OsmPrimitive leg) {
         super(parent, Severity.ERROR);
@@ -26,39 +27,47 @@
 
     @Override
-    public String getText() {       
+    public String getText() {
+        // CHECKSTYLE.OFF: LineLength
         return tr("This turn restriction uses the way <span class=\"object-name\">{0}</span> with role <tt>from</tt> <strong>and</strong> with role <tt>to</tt>. "
                 + "In a turn restriction, the way with role <tt>from</tt> should be different from the way with role <tt>to</tt>, though.",
                 leg.getDisplayName(DefaultNameFormatter.getInstance())
-                );              
+                );
+        // CHECKSTYLE.ON: LineLength
     }
-    
+
     class DeleteFromAction extends AbstractAction {
-        public DeleteFromAction() {
+        DeleteFromAction() {
             putValue(NAME, tr("Delete ''from''"));
             putValue(SHORT_DESCRIPTION, tr("Removes the member with role ''from''"));
         }
+
+        @Override
         public void actionPerformed(ActionEvent e) {
-            getIssuesModel().getEditorModel().getRelationMemberEditorModel().setFromPrimitive(null);            
-        }       
+            getIssuesModel().getEditorModel().getRelationMemberEditorModel().setFromPrimitive(null);
+        }
     }
-    
+
     class DeleteToAction extends AbstractAction {
-        public DeleteToAction() {
+        DeleteToAction() {
             putValue(NAME, tr("Delete ''to''"));
             putValue(SHORT_DESCRIPTION, tr("Removes the member with role ''to''"));
         }
+
+        @Override
         public void actionPerformed(ActionEvent e) {
-            getIssuesModel().getEditorModel().getRelationMemberEditorModel().setToPrimitive(null);          
-        }       
+            getIssuesModel().getEditorModel().getRelationMemberEditorModel().setToPrimitive(null);
+        }
     }
-    
+
     class FixInEditorAction extends AbstractAction {
-        public FixInEditorAction() {
+        FixInEditorAction() {
             putValue(NAME, tr("Fix in editor"));
             putValue(SHORT_DESCRIPTION, tr("Go to Basic Editor and manually choose members with roles ''from'' and ''to''"));
         }
+
+        @Override
         public void actionPerformed(ActionEvent e) {
-            getIssuesModel().getNavigationControler().gotoBasicEditor();        
-        }       
+            getIssuesModel().getNavigationControler().gotoBasicEditor();
+        }
     }
 }
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/IllegalRestrictionTypeError.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/IllegalRestrictionTypeError.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/IllegalRestrictionTypeError.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.qa;
 
@@ -12,9 +13,9 @@
  * Issue when the restriction type isn't a standard value. Can't be fixed
  * automatically, user is directed to the Basic editor.
- * 
+ *
  */
-public class IllegalRestrictionTypeError extends Issue{
+public class IllegalRestrictionTypeError extends Issue {
     private String value;
-    
+
     public IllegalRestrictionTypeError(IssuesModel parent, String value) {
         super(parent, Severity.ERROR);
@@ -24,19 +25,21 @@
 
     @Override
-    public String getText() {       
+    public String getText() {
         return tr("This turn restriction uses a non-standard restriction type <tt>{0}</tt> for the tag key <tt>restriction</tt>. "
                 + "It is recommended to use standard values only. Please select one in the Basic editor.",
                 value
-                );              
+                );
     }
-    
+
     class FixInEditorAction extends AbstractAction {
-        public FixInEditorAction() {
+        FixInEditorAction() {
             putValue(NAME, tr("Fix in editor"));
             putValue(SHORT_DESCRIPTION, tr("Go to Basic Editor and manually choose a turn restriction type"));
         }
+
+        @Override
         public void actionPerformed(ActionEvent e) {
-            getIssuesModel().getNavigationControler().gotoBasicEditor(NavigationControler.BasicEditorFokusTargets.RESTRICION_TYPE);         
-        }       
+            getIssuesModel().getNavigationControler().gotoBasicEditor(NavigationControler.BasicEditorFokusTargets.RESTRICION_TYPE);
+        }
     }
 }
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/IntersectionMissingAsViaError.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/IntersectionMissingAsViaError.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/IntersectionMissingAsViaError.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.qa;
 
@@ -15,13 +16,12 @@
 
 /**
- * Issue when 'from' and 'to' intersect at node n and n isn't
- * a via.
- * 
+ * Issue when 'from' and 'to' intersect at node n and n isn't a via.
+ *
  */
-public class IntersectionMissingAsViaError extends Issue{
+public class IntersectionMissingAsViaError extends Issue {
     private Way from;
     private Way to;
     private Node intersect;
-    
+
     public IntersectionMissingAsViaError(IssuesModel parent, Way from, Way to, Node intersect) {
         super(parent, Severity.ERROR);
@@ -34,6 +34,7 @@
 
     @Override
-    public String getText() {       
-        String msg = tr("The <strong>from</strong>-way <span class=\"object-name\">{0}</span> and the <strong>to</strong>-way <span class=\"object-name\">{1}</span> "
+    public String getText() {
+        // CHECKSTYLE.OFF: LineLength
+        return tr("The <strong>from</strong>-way <span class=\"object-name\">{0}</span> and the <strong>to</strong>-way <span class=\"object-name\">{1}</span> "
                + "intersect at node <span class=\"object-name\">{2}</span> but this node isn''t a <strong>via</strong>-object.<br> "
                + "It is recommended to set it as unique <strong>via</strong>-object.",
@@ -42,25 +43,29 @@
                this.intersect.getDisplayName(DefaultNameFormatter.getInstance())
         );
-        return msg;
+        // CHECKSTYLE.ON: LineLength
     }
-    
+
     class SetVia extends AbstractAction {
-        public SetVia() {
+        SetVia() {
             putValue(NAME, tr("Set via-Object"));
             putValue(SHORT_DESCRIPTION, tr("Replaces the currently configured via-objects with the node at the intersection"));
         }
+
+        @Override
         public void actionPerformed(ActionEvent e) {
             getIssuesModel().getEditorModel().setVias(Collections.<OsmPrimitive>singletonList(intersect));
-        }       
+        }
     }
-    
+
     class FixInEditorAction extends AbstractAction {
-        public FixInEditorAction() {
+        FixInEditorAction() {
             putValue(NAME, tr("Fix in editor"));
             putValue(SHORT_DESCRIPTION, tr("Go to Basic Editor and manually fix the list of via-objects"));
         }
+
+        @Override
         public void actionPerformed(ActionEvent e) {
-            getIssuesModel().getNavigationControler().gotoBasicEditor(BasicEditorFokusTargets.VIA); 
-        }       
+            getIssuesModel().getNavigationControler().gotoBasicEditor(BasicEditorFokusTargets.VIA);
+        }
     }
 }
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/Issue.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/Issue.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/Issue.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.qa;
 
@@ -10,40 +11,40 @@
 
 /**
- * An issue represents a data integrity violation in a turn restriction. 
- * 
+ * An issue represents a data integrity violation in a turn restriction.
+ *
  * The issue has a {@see Severity}. It is described to the user with a HTML formatted
  * text (see {@see #getText()}) and it suggests a list of possible actions to fix
  * the issue (see {@see #getActions()}).
- * 
+ *
  */
-abstract public class Issue {
+public abstract class Issue {
     /** the parent model for this issue */
     protected IssuesModel parent;
     protected Severity severity;
     protected final ArrayList<Action> actions = new ArrayList<>();
-    
+
     /**
      * Creates a new issue associated with a parent model. Severity is
      * initialized to {@see Severity#WARNING}.
-     * 
+     *
      * @param parent the parent model. Must not be null.
      * @throws IllegalArgumentException thrown if parent is null
      */
-    public Issue(IssuesModel parent) throws IllegalArgumentException{
+    public Issue(IssuesModel parent) throws IllegalArgumentException {
         CheckParameterUtil.ensureParameterNotNull(parent, "parent");
         this.parent = parent;
         this.severity = Severity.WARNING;
     }
-    
+
     /**
      * Creates a new issue of severity {@code severity} associated with
      * the parent model {@code parent}.
-     * 
+     *
      * @param parent the parent model. Must not be null.
      * @param severity the severity. Must not be null.
      * @throws IllegalArgumentException thrown if parent is null
-     * @throws IllegalArgumentException thrown if severity is null 
+     * @throws IllegalArgumentException thrown if severity is null
      */
-    public Issue(IssuesModel parent, Severity severity){
+    public Issue(IssuesModel parent, Severity severity) {
         CheckParameterUtil.ensureParameterNotNull(parent, "parent");
         CheckParameterUtil.ensureParameterNotNull(severity, "severity");
@@ -53,7 +54,7 @@
 
     /**
-     * Replies the parent model this issue is associated with 
-     * 
-     * @return the parent model 
+     * Replies the parent model this issue is associated with
+     *
+     * @return the parent model
      */
     public IssuesModel getIssuesModel() {
@@ -62,7 +63,7 @@
 
     /**
-     * Replies the severity of this issue 
-     * 
-     * @return the severity 
+     * Replies the severity of this issue
+     *
+     * @return the severity
      */
     public Severity getSeverity() {
@@ -71,6 +72,6 @@
 
     /**
-     * Sets the severity of this issue. 
-     * 
+     * Sets the severity of this issue.
+     *
      * @param severity the severity. Must not be null.
      * @throws IllegalArgumentException thrown if severity is null
@@ -83,14 +84,14 @@
     /**
      * Replies the HTML formatted description of the issue. The text should neither include
-     * the &lt;html&gt;, nor the &lt;body&gt; tag.  
-     * 
+     * the &lt;html&gt;, nor the &lt;body&gt; tag.
+     *
      * @return the HTML formatted description of the issue.
      */
     public abstract String getText();
-    
+
     /**
      * Replies a list of actions which can be applied to this issue in order to fix
      * it. The default implementation replies an empty list.
-     * 
+     *
      * @return a list of action
      */
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/IssueView.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/IssueView.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/IssueView.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.qa;
 
@@ -24,5 +25,5 @@
  * An IssueView is a view on an individual {@see Issue}.
  */
-public class IssueView extends JPanel{
+public class IssueView extends JPanel {
 
     private HtmlPanel pnlMessage;
@@ -30,5 +31,5 @@
     private Issue issue;
     private JLabel lblIcon;
-    
+
      /**
      * Builds the style sheet used in the internal help browser
@@ -37,16 +38,16 @@
      */
     protected void initStyleSheet(HtmlPanel view) {
-        StyleSheet ss = ((HTMLEditorKit)view.getEditorPane().getEditorKit()).getStyleSheet();
+        StyleSheet ss = ((HTMLEditorKit) view.getEditorPane().getEditorKit()).getStyleSheet();
         ss.addRule("em {font-style: italic}");
         ss.addRule("tt {font-family: Courier New}");
-        ss.addRule(".object-name {background-color:rgb(240,240,240); color: blue;}");
+        ss.addRule(".object-name {background-color:rgb(240, 240, 240); color: blue;}");
     }
-    
+
     protected void build() {
         setLayout(new GridBagLayout());
         setBackground(Color.WHITE);
         setBorder(BorderFactory.createLineBorder(Color.DARK_GRAY, 1));
-        
-        // add the icon for the severity 
+
+        // add the icon for the severity
         GridBagConstraints gc = new GridBagConstraints();
         gc.anchor = GridBagConstraints.NORTHWEST;
@@ -57,12 +58,12 @@
         gc.gridx = 0;
         gc.gridy = 0;
-        gc.insets = new Insets(2,2,2,2);
+        gc.insets = new Insets(2, 2, 2, 2);
         add(lblIcon = new JLabel(), gc);
         lblIcon.setVerticalAlignment(SwingConstants.TOP);
         lblIcon.setHorizontalAlignment(SwingConstants.CENTER);
-        lblIcon.setBorder(BorderFactory.createEmptyBorder(2,2,2,2));
+        lblIcon.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
 
-        // add the html panel with the issue description 
-        gc.insets = new Insets(0,0,0,0);
+        // add the html panel with the issue description
+        gc.insets = new Insets(0, 0, 0, 0);
         gc.anchor = GridBagConstraints.NORTHWEST;
         gc.fill = GridBagConstraints.BOTH;
@@ -77,24 +78,24 @@
         pnlMessage.setText("<html><body>" + issue.getText() + "</html></bod>");
 
-        
-        // if there are any actions available to resolve the issue, add a panel with action buttons 
+
+        // if there are any actions available to resolve the issue, add a panel with action buttons
         if (!issue.getActions().isEmpty()) {
             pnlActions = new JPanel(new FlowLayout(FlowLayout.LEFT));
             pnlActions.setBackground(Color.WHITE);
-            for (Action action: issue.getActions()){
+            for (Action action: issue.getActions()) {
                 JButton btn = new JButton(action);
-                pnlActions.add(btn);                
+                pnlActions.add(btn);
             }
-            
-            gc.gridx = 1;           
-            gc.gridy = 1;           
+
+            gc.gridx = 1;
+            gc.gridy = 1;
             gc.fill = GridBagConstraints.HORIZONTAL;
             gc.weighty = 0.0;
-            add(pnlActions,gc);
-        }   
-        
-        // set the severity icon 
-        switch(issue.getSeverity()){
-        case WARNING: 
+            add(pnlActions, gc);
+        }
+
+        // set the severity icon
+        switch(issue.getSeverity()) {
+        case WARNING:
             lblIcon.setIcon(ImageProvider.get("warning-small"));
             break;
@@ -102,17 +103,17 @@
             lblIcon.setIcon(ImageProvider.get("error"));
             break;
-        }       
+        }
     }
-    
+
     /**
      * Creates an issue view for an issue.
-     * 
+     *
      * @param issue the issue. Must not be null.
      * @throws IllegalArgumentException thrown if issue is null.
      */
-    public IssueView(Issue issue) throws IllegalArgumentException{
+    public IssueView(Issue issue) throws IllegalArgumentException {
         CheckParameterUtil.ensureParameterNotNull(issue, "issue");
         this.issue = issue;
-        build();        
+        build();
     }
 
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/IssuesModel.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/IssuesModel.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/IssuesModel.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.qa;
 
@@ -26,35 +27,35 @@
  * <p>IssuesModel is a model for an observable list of {@code Issues}
  * related to turn restriction.</p>
- * 
+ *
  * <p>It is also an {@link Observer} to an {@link TurnRestrictionEditorModel}
  * and populates itself with issues it derives from the current state
  * in the {@link TurnRestrictionEditorModel}.</p>
- *  
+ *
  */
-public class IssuesModel extends Observable implements Observer{
+public class IssuesModel extends Observable implements Observer {
     private final ArrayList<Issue> issues = new ArrayList<>();
     private TurnRestrictionEditorModel editorModel;
-    
-    /**
-     * Creates the model 
-     * 
+
+    /**
+     * Creates the model
+     *
      * @param editorModel the editor model. Must not be null.
      * @throws IllegalArgumentException thrown if controler is null
      */
-    public IssuesModel(TurnRestrictionEditorModel editorModel) throws IllegalArgumentException{
+    public IssuesModel(TurnRestrictionEditorModel editorModel) throws IllegalArgumentException {
         CheckParameterUtil.ensureParameterNotNull(editorModel, "editorModel");
         this.editorModel = editorModel;
         this.editorModel.addObserver(this);
     }
-    
+
     /**
      * Populates the model with a list of issues. Just clears the model
-     * if {@code issues} is null or empty. 
-     * 
-     * @param issues the list of issues. 
-     */
-    public void populate(List<Issue> issues){
+     * if {@code issues} is null or empty.
+     *
+     * @param issues the list of issues.
+     */
+    public void populate(List<Issue> issues) {
         this.issues.clear();
-        if (issues != null){
+        if (issues != null) {
             this.issues.addAll(issues);
         }
@@ -62,8 +63,8 @@
         notifyObservers();
     }
-    
+
     /**
      * Replies the (unmodifiable) list of issues in this model.
-     * 
+     *
      * @return the (unmodifiable) list of issues in this model.
      */
@@ -71,20 +72,18 @@
         return Collections.unmodifiableList(issues);
     }
-    
-    /**
-     * Replies the turn restriction editor model 
-     * 
-     * @return
+
+    /**
+     * Replies the turn restriction editor model
      */
     public TurnRestrictionEditorModel getEditorModel() {
         return editorModel;
     }
-    
+
     /**
      * Populates this model with issues derived from the state of the
      * turn restriction editor model. If {@code editorModel} is null, the
      * list of issues is cleared.
-     * 
-     * @param editorModel the editor model. 
+     *
+     * @param editorModel the editor model.
      */
     public void populate() {
@@ -100,19 +99,17 @@
         notifyObservers();
     }
-    
-    /**
-     * Checks whether there are required tags missing. 
-     * 
-     * @param editorModel
+
+    /**
+     * Checks whether there are required tags missing.
      */
     protected void checkTags(TurnRestrictionEditorModel editorModel) {
         TagEditorModel tagEditorModel = editorModel.getTagEditorModel();
         TagModel tag = tagEditorModel.get("type");
-        
+
         // missing marker tag for a turn restriction
-        if (tag == null || ! tag.getValue().trim().equals("restriction")) {
+        if (tag == null || !tag.getValue().trim().equals("restriction")) {
             issues.add(new RequiredTagMissingError(this, "type", "restriction"));
         }
-        
+
         // missing or illegal restriction type ?
         tag = tagEditorModel.get("restriction");
@@ -123,5 +120,5 @@
         }
 
-        // non-standard value for the 'except' tag? 
+        // non-standard value for the 'except' tag?
         ExceptValueModel except = getEditorModel().getExcept();
         if (!except.isStandard()) {
@@ -129,84 +126,82 @@
         }
     }
-    
+
     /**
      * Checks various data integrity restriction for the relation member with
      * role 'from'.
-     * 
+     *
      */
     protected void checkFromLeg(TurnRestrictionEditorModel editorModel) {
         Set<OsmPrimitive> froms = editorModel.getTurnRestrictionLeg(TurnRestrictionLegRole.FROM);
-        if (froms.isEmpty()){
+        if (froms.isEmpty()) {
             issues.add(new MissingTurnRestrictionLegError(this, TurnRestrictionLegRole.FROM));
             return;
-        } else if (froms.size() > 1){
+        } else if (froms.size() > 1) {
             issues.add(new MultipleTurnRestrictionLegError(this, TurnRestrictionLegRole.FROM, froms.size()));
             return;
-        } 
+        }
         OsmPrimitive p = froms.iterator().next();
-        if (! (p instanceof Way)) {
+        if (!(p instanceof Way)) {
             issues.add(new WrongTurnRestrictionLegTypeError(this, TurnRestrictionLegRole.FROM, p));
         }
     }
-    
+
     /**
      * Checks various data integrity restriction for the relation member with
      * role 'to'.
-     * 
+     *
      */
     protected void checkToLeg(TurnRestrictionEditorModel editorModel) {
         Set<OsmPrimitive> toLegs = editorModel.getTurnRestrictionLeg(TurnRestrictionLegRole.TO);
-        if (toLegs.isEmpty()){
+        if (toLegs.isEmpty()) {
             issues.add(new MissingTurnRestrictionLegError(this, TurnRestrictionLegRole.TO));
             return;
-        } else if (toLegs.size() > 1){
+        } else if (toLegs.size() > 1) {
             issues.add(new MultipleTurnRestrictionLegError(this, TurnRestrictionLegRole.TO, toLegs.size()));
             return;
-        } 
+        }
         OsmPrimitive p = toLegs.iterator().next();
-        if (! (p instanceof Way)) {
+        if (!(p instanceof Way)) {
             issues.add(new WrongTurnRestrictionLegTypeError(this, TurnRestrictionLegRole.TO, p));
         }
     }
-    
+
     /**
      * Creates an issue if this turn restriction has identical 'from' and to'.
-     * 
-     * @param editorModel
-     */
-    protected void checkFromAndToEquals(TurnRestrictionEditorModel editorModel){
+     */
+    protected void checkFromAndToEquals(TurnRestrictionEditorModel editorModel) {
         Set<OsmPrimitive> toLegs = editorModel.getTurnRestrictionLeg(TurnRestrictionLegRole.TO);
         Set<OsmPrimitive> fromLegs = editorModel.getTurnRestrictionLeg(TurnRestrictionLegRole.FROM);
         if (toLegs.size() != 1 || fromLegs.size() != 1) return;
-        
+
         OsmPrimitive from = fromLegs.iterator().next();
         OsmPrimitive to = toLegs.iterator().next();
-        
-        if (! (from instanceof Way)) return;
-        if (! (to instanceof Way)) return;
-        if (from.equals(to) && ! "no_u_turn".equals(editorModel.getRestrictionTagValue())){
+
+        if (!(from instanceof Way)) return;
+        if (!(to instanceof Way)) return;
+        if (from.equals(to) && !"no_u_turn".equals(editorModel.getRestrictionTagValue())) {
             // identical from and to allowed for "no_u_turn" only
             //
             issues.add(new IdenticalTurnRestrictionLegsError(this, from));
-        }       
-    }
-    
+        }
+    }
+
     /**
      * Checks the 'via' members in the turn restriction
-     * 
+     *
      * @param editorModel the editor model
      */
-    protected void checkVias(TurnRestrictionEditorModel editorModel){
+    protected void checkVias(TurnRestrictionEditorModel editorModel) {
         Set<OsmPrimitive> toLegs = editorModel.getTurnRestrictionLeg(TurnRestrictionLegRole.TO);
         Set<OsmPrimitive> fromLegs = editorModel.getTurnRestrictionLeg(TurnRestrictionLegRole.FROM);
         // we only check vias if 'to' and 'from' are already OK
         if (toLegs.size() != 1 || fromLegs.size() != 1) return;
-        if (! (toLegs.iterator().next() instanceof Way)) return;
-        if (! (fromLegs.iterator().next() instanceof Way)) return;
-        
-        Way from = (Way)fromLegs.iterator().next();
-        Way to = (Way)toLegs.iterator().next();
-        Node intersect = TurnRestrictionBuilder.getUniqueCommonNode(from, to);        
-        if (intersect != null){
+        if (!(toLegs.iterator().next() instanceof Way)) return;
+        if (!(fromLegs.iterator().next() instanceof Way)) return;
+
+        Way from = (Way) fromLegs.iterator().next();
+        Way to = (Way) toLegs.iterator().next();
+        Node intersect = TurnRestrictionBuilder.getUniqueCommonNode(from, to);
+        if (intersect != null) {
             if (!editorModel.getVias().contains(intersect)) {
                 issues.add(new IntersectionMissingAsViaError(this, from, to, intersect));
@@ -214,5 +209,5 @@
             if (isInnerNode(from, intersect) && isInnerNode(to, intersect)) {
                 issues.add(new TurnRestrictionLegSplitRequiredError(this, from, to));
-            } else if (isInnerNode(from, intersect) && ! isInnerNode(to, intersect)) {
+            } else if (isInnerNode(from, intersect) && !isInnerNode(to, intersect)) {
                 issues.add(new TurnRestrictionLegSplitRequiredError(this, TurnRestrictionLegRole.FROM, from, to, intersect));
             } else if (!isInnerNode(from, intersect) && isInnerNode(to, intersect)) {
@@ -220,19 +215,19 @@
             }
         } else {
-            if (editorModel.getVias().isEmpty() && ! from.equals(to)){
+            if (editorModel.getVias().isEmpty() && !from.equals(to)) {
                 // the two turn restriction legs aren't connected and we don't have configured
-                // via objects 
+                // via objects
                 issues.add(new MissingViaError(this));
             }
-        }               
-    }
-    
+        }
+    }
+
     public NavigationControler getNavigationControler() {
         return editorModel.getNavigationControler();
     }
-    
+
     public int getNumWarnings() {
         int ret = 0;
-        for (Issue issue: issues){
+        for (Issue issue: issues) {
             if (issue.getSeverity().equals(Severity.WARNING)) ret++;
         }
@@ -242,5 +237,5 @@
     public int getNumErrors() {
         int ret = 0;
-        for (Issue issue: issues){
+        for (Issue issue: issues) {
             if (issue.getSeverity().equals(Severity.ERROR)) ret++;
         }
@@ -251,6 +246,7 @@
     /* interface Observer                                                                    */
     /* ------------------------------------------------------------------------------------- */
+    @Override
     public void update(Observable o, Object arg) {
-        populate();     
+        populate();
     }
 }
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/IssuesView.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/IssuesView.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/IssuesView.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.qa;
 
@@ -15,21 +16,21 @@
  * IssuesView provides a view on a {@see IssuesModel}.
  */
-public class IssuesView extends VerticallyScrollablePanel implements Observer{
-    //static private final Logger logger = Logger.getLogger(IssuesView.class.getName());
-    
+public class IssuesView extends VerticallyScrollablePanel implements Observer {
+    //private static final Logger logger = Logger.getLogger(IssuesView.class.getName());
+
     /** the issues model */
     private IssuesModel model;
-    
-    protected void build(){
+
+    protected void build() {
         setLayout(new GridBagLayout());
     }
-    
+
     /**
-     * Creates the view 
-     * 
+     * Creates the view
+     *
      * @param model the model. Must not be null.
      * @exception IllegalArgumentException thrown if model is null
      */
-    public IssuesView(IssuesModel model) throws IllegalArgumentException{
+    public IssuesView(IssuesModel model) throws IllegalArgumentException {
         CheckParameterUtil.ensureParameterNotNull(model, "model");
         this.model = model;
@@ -38,5 +39,5 @@
         HelpUtil.setHelpContext(this, HelpUtil.ht("/Plugin/TurnRestrictions#ErrorsAndWarnings"));
     }
-    
+
     /**
      * Refreshes the view with the current state in the model
@@ -44,5 +45,5 @@
     public void refresh() {
         removeAll();
-        if (! model.getIssues().isEmpty()){
+        if (!model.getIssues().isEmpty()) {
             GridBagConstraints gc = new GridBagConstraints();
             gc.anchor = GridBagConstraints.NORTHWEST;
@@ -52,10 +53,10 @@
             gc.gridx = 0;
             gc.gridy = 0;
-            for (Issue issue: model.getIssues()){
+            for (Issue issue: model.getIssues()) {
                 add(new IssueView(issue), gc);
                 gc.gridy++;
             }
             // filler - grabs remaining space
-            gc.weighty = 1.0;           
+            gc.weighty = 1.0;
             add(new JPanel(), gc);
         }
@@ -66,6 +67,7 @@
     /* interface Observer                                                              */
     /* ------------------------------------------------------------------------------- */
+    @Override
     public void update(Observable o, Object arg) {
-        refresh();      
+        refresh();
     }
 }
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/MissingRestrictionTypeError.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/MissingRestrictionTypeError.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/MissingRestrictionTypeError.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.qa;
 
@@ -12,8 +13,8 @@
  * Issue when the restriction type is missing. Can't be fixed automatically, user
  * is redirected to the Basic Editor.
- * 
+ *
  */
-public class MissingRestrictionTypeError extends Issue{
-    
+public class MissingRestrictionTypeError extends Issue {
+
     public MissingRestrictionTypeError(IssuesModel parent) {
         super(parent, Severity.ERROR);
@@ -23,15 +24,17 @@
     @Override
     public String getText() {
-        return tr("A turn restriction must declare the type of restriction. Please select a type in the Basic Editor.");                
+        return tr("A turn restriction must declare the type of restriction. Please select a type in the Basic Editor.");
     }
-    
+
     class FixInEditorAction extends AbstractAction {
-        public FixInEditorAction() {
+        FixInEditorAction() {
             putValue(NAME, tr("Fix in editor"));
             putValue(SHORT_DESCRIPTION, tr("Go to Basic Editor and manually choose a turn restriction type"));
         }
+
+        @Override
         public void actionPerformed(ActionEvent e) {
-            getIssuesModel().getNavigationControler().gotoBasicEditor(NavigationControler.BasicEditorFokusTargets.RESTRICION_TYPE);         
-        }       
+            getIssuesModel().getNavigationControler().gotoBasicEditor(NavigationControler.BasicEditorFokusTargets.RESTRICION_TYPE);
+        }
     }
 }
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/MissingTurnRestrictionLegError.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/MissingTurnRestrictionLegError.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/MissingTurnRestrictionLegError.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.qa;
 
@@ -14,5 +15,5 @@
  * A member with role 'from' or 'to' is missing. Can't be fixed automatically.
  * Redirect the user to the Basic editor panel.
- * 
+ *
  */
 public class MissingTurnRestrictionLegError extends Issue {
@@ -20,7 +21,7 @@
 
     /**
-     * Creates the issue. 
-     * 
-     * @param parent the parent model 
+     * Creates the issue.
+     *
+     * @param parent the parent model
      * @param role the role of the missing way
      */
@@ -34,9 +35,9 @@
     public String getText() {
         String msg = "";
-        switch(role){
-        case FROM: 
+        switch(role) {
+        case FROM:
             msg = tr("A way with role <tt>from</tt> is required in a turn restriction.");
             break;
-        case TO: 
+        case TO:
             msg = tr("A way with role <tt>to</tt> is required in a turn restriction.");
             break;
@@ -47,7 +48,7 @@
 
     class FixAction extends AbstractAction {
-        public FixAction() {
+        FixAction() {
             putValue(NAME, tr("Add in editor"));
-            switch(role){
+            switch(role) {
             case FROM:
                 putValue(SHORT_DESCRIPTION, tr("Add a way with role ''from''"));
@@ -55,9 +56,11 @@
             case TO:
                 putValue(SHORT_DESCRIPTION, tr("Add a way with role ''to''"));
-                break;              
-            }           
+                break;
+            }
         }
+
+        @Override
         public void actionPerformed(ActionEvent e) {
-            switch(role){
+            switch(role) {
             case FROM:
                 getIssuesModel().getNavigationControler().gotoBasicEditor(FROM);
@@ -65,7 +68,7 @@
             case TO:
                 getIssuesModel().getNavigationControler().gotoBasicEditor(TO);
-                break;              
-            }           
-        }       
+                break;
+            }
+        }
     }
 }
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/MissingViaError.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/MissingViaError.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/MissingViaError.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.qa;
 
@@ -8,7 +9,7 @@
 
 /**
- * Issue if the legs of a turn restriction aren't connected and if there 
- * are no via objects configured. 
- * 
+ * Issue if the legs of a turn restriction aren't connected and if there
+ * are no via objects configured.
+ *
  */
 public class MissingViaError extends Issue {
@@ -21,5 +22,5 @@
     @Override
     public String getText() {
-         String msg = 
+         String msg =
              tr("The two ways participating in the turn restriction <strong>aren''t connected.</strong>")
             + "<p>"
@@ -29,11 +30,13 @@
 
     class FixAction extends AbstractAction {
-        public FixAction() {
+        FixAction() {
             putValue(NAME, tr("Fix in editor"));
             putValue(SHORT_DESCRIPTION, tr("Go to the Advanced Editor and add via objects"));
         }
+
+        @Override
         public void actionPerformed(ActionEvent e) {
             getIssuesModel().getNavigationControler().gotoAdvancedEditor();
-        }       
+        }
     }
 }
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/MultipleTurnRestrictionLegError.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/MultipleTurnRestrictionLegError.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/MultipleTurnRestrictionLegError.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.qa;
 
@@ -11,15 +12,15 @@
 /**
  * Issue when a turn restriction has multiple members with role 'from' or 'to'.
- * 
+ *
  */
 public class MultipleTurnRestrictionLegError extends Issue {
     private TurnRestrictionLegRole role;
     private int numLegs;
-    
+
     /**
      * Create the issue
-     * 
-     * @param parent the parent model 
-     * @param role the role of the turn restriction leg with multiple entries 
+     *
+     * @param parent the parent model
+     * @param role the role of the turn restriction leg with multiple entries
      * @param numLegs the number of legs
      */
@@ -33,6 +34,6 @@
     @Override
     public String getText() {
-        switch(role){
-        case FROM:  
+        switch(role) {
+        case FROM:
             return tr("A turn restriction requires exactly one way with role <tt>from</tt>. "
                 + "This turn restriction has {0} ways in this role. Please remove "
@@ -41,5 +42,5 @@
                 numLegs -1
             );
-        case TO: 
+        case TO:
             return tr("A turn restriction requires exactly one way with role <tt>to</tt>. "
                     + "This turn restriction has {0} ways in this role. Please remove "
@@ -53,11 +54,13 @@
 
     class FixAction extends AbstractAction {
-        public FixAction() {
+        FixAction() {
             putValue(NAME, tr("Fix in editor"));
             putValue(SHORT_DESCRIPTION, tr("Go to the Advanced Editor and remove the members"));
         }
+
+        @Override
         public void actionPerformed(ActionEvent e) {
             getIssuesModel().getNavigationControler().gotoAdvancedEditor();
-        }       
+        }
     }
 }
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/NonStandardExceptWarning.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/NonStandardExceptWarning.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/NonStandardExceptWarning.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.qa;
 
@@ -11,30 +12,32 @@
 /**
  * Issue when the 'except' tag consists of non-standard values
- * 
+ *
  */
-public class NonStandardExceptWarning extends Issue{
+public class NonStandardExceptWarning extends Issue {
     private ExceptValueModel value;
     public NonStandardExceptWarning(IssuesModel parent, ExceptValueModel value) {
         super(parent, Severity.WARNING);
         actions.add(new FixInEditorAction());
-        this.value  = value;
+        this.value = value;
     }
 
     @Override
-    public String getText() {       
+    public String getText() {
         return tr("The tag <tt>except</tt> has the non-standard value <tt>{0}</tt>. "
                 + "It is recommended to use standard values for <tt>except</tt> only.",
                 value.getValue()
-                );              
+                );
     }
-    
+
     class FixInEditorAction extends AbstractAction {
-        public FixInEditorAction() {
+        FixInEditorAction() {
             putValue(NAME, tr("Fix in editor"));
             putValue(SHORT_DESCRIPTION, tr("Go to Basic Editor and select standard vehicle type based exceptions"));
         }
+
+        @Override
         public void actionPerformed(ActionEvent e) {
-            getIssuesModel().getNavigationControler().gotoBasicEditor();        
-        }       
+            getIssuesModel().getNavigationControler().gotoBasicEditor();
+        }
     }
 }
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/RequiredTagMissingError.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/RequiredTagMissingError.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/RequiredTagMissingError.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.qa;
 
@@ -14,14 +15,14 @@
  */
 public class RequiredTagMissingError extends Issue {
-    //static private final Logger logger = Logger.getLogger(RequiredTagMissingError.class.getName());
+    //private static final Logger logger = Logger.getLogger(RequiredTagMissingError.class.getName());
     private String tagKey;
     private String tagValue;
-    
+
     /**
-     * Create the issue 
-     * 
+     * Create the issue
+     *
      * @param parent the issues model
-     * @param tagKey the tag key 
-     * @param tagValue the tag value 
+     * @param tagKey the tag key
+     * @param tagValue the tag value
      */
     public RequiredTagMissingError(IssuesModel parent, String tagKey, String tagValue) {
@@ -33,6 +34,6 @@
 
     @Override
-    public String getText() {   
-        return tr("The required tag <tt>{0}={1}</tt> is missing.",              
+    public String getText() {
+        return tr("The required tag <tt>{0}={1}</tt> is missing.",
                 this.tagKey,
                 this.tagValue
@@ -41,17 +42,18 @@
 
     private class AddTagAction extends AbstractAction {
-        public AddTagAction(){
-            putValue(NAME,tr("Add missing tag"));
-            putValue(SHORT_DESCRIPTION, tr("Add the missing tag {0}={1}", tagKey, tagValue));       
+        AddTagAction() {
+            putValue(NAME, tr("Add missing tag"));
+            putValue(SHORT_DESCRIPTION, tr("Add the missing tag {0}={1}", tagKey, tagValue));
         }
-        
+
+        @Override
         public void actionPerformed(ActionEvent e) {
             TagEditorModel model = getIssuesModel().getEditorModel().getTagEditorModel();
             TagModel t = model.get(tagKey);
-            if (t == null){
+            if (t == null) {
                 t = new TagModel(tagKey, tagValue);
                 model.prepend(t);
-            }           
-        }        
+            }
+        }
     }
 }
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/Severity.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/Severity.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/Severity.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.qa;
 
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/TurnRestrictionLegSplitRequiredError.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/TurnRestrictionLegSplitRequiredError.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/TurnRestrictionLegSplitRequiredError.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.qa;
 
@@ -26,30 +27,29 @@
  *
  */
-public class TurnRestrictionLegSplitRequiredError extends Issue{
-    //static private final Logger logger = Logger.getLogger(TurnRestrictionLegSplitRequiredError.class.getName());
-    
+public class TurnRestrictionLegSplitRequiredError extends Issue {
+
     private TurnRestrictionLegRole role;
     private Way from;
     private Way to;
     private Node intersect;
-    
+
     /**
      * <p>Creates the issue for a pair of ways {@code from} and {@code to} which intersect
      * at node {@code intersect}.</p>
-     * 
-     * @param parent the parent model 
+     *
+     * @param parent the parent model
      * @param from the way with role "from"
      * @param to the way with role "to"
-     * @param intersect the intersection node 
+     * @param intersect the intersection node
      */
-    public TurnRestrictionLegSplitRequiredError(IssuesModel parent, Way from, Way to){
+    public TurnRestrictionLegSplitRequiredError(IssuesModel parent, Way from, Way to) {
         super(parent, Severity.ERROR);
         CheckParameterUtil.ensureParameterNotNull(from, "from");
         CheckParameterUtil.ensureParameterNotNull(to, "to");
-        
-        intersect= TurnRestrictionBuilder.getUniqueCommonNode(from, to);
+
+        intersect = TurnRestrictionBuilder.getUniqueCommonNode(from, to);
         if (intersect == null)
             throw new IllegalArgumentException("exactly one intersecting node required");
-        
+
         this.from = from;
         this.to = to;
@@ -79,10 +79,10 @@
     public String getText() {
         String msg = null;
-        if (role == null){
+        if (role == null) {
             /*
              * from and to intersect at a common node. Both have to be split.
              */
             return tr("The way <span class=\"object-name\">{0}</span> with role <tt>from</tt> and the "
-                    + "way <span class=\"object-name\">{1}</span> with role <tt>to</tt> intersect "                    
+                    + "way <span class=\"object-name\">{1}</span> with role <tt>to</tt> intersect "
                     + "at node <span class=\"object-name\">{2}</span>. "
                     + "<p> "
@@ -93,5 +93,5 @@
                 );
         }
-        switch(role){
+        switch(role) {
         case FROM:
             /*
@@ -123,13 +123,14 @@
 
     class SplitAction extends AbstractAction {
-        public SplitAction() {
+        SplitAction() {
             putValue(NAME, tr("Split now"));
             putValue(SHORT_DESCRIPTION, tr("Split the ways"));
         }
-        
+
+        @Override
         public void actionPerformed(ActionEvent e) {
 
             SplitWayResult result = null;
-            if (role == null || role.equals(TurnRestrictionLegRole.FROM)){
+            if (role == null || role.equals(TurnRestrictionLegRole.FROM)) {
                   result = SplitWayAction.split(
                           parent.getEditorModel().getLayer(),
@@ -138,9 +139,9 @@
                           Collections.<OsmPrimitive>emptyList()
                   );
-                  if (result != null){
+                  if (result != null) {
                       Main.main.undoRedo.add(result.getCommand());
                   }
             }
-            
+
             if (role == null || role.equals(TurnRestrictionLegRole.TO)) {
                 result = SplitWayAction.split(
@@ -150,9 +151,10 @@
                         Collections.<OsmPrimitive>emptyList()
                 );
-                if (result != null){
+                if (result != null) {
                     Main.main.undoRedo.add(result.getCommand());
                 }
                 if (result == null) return;
-                TurnRestrictionType restrictionType = TurnRestrictionType.fromTagValue(getIssuesModel().getEditorModel().getRestrictionTagValue());
+                TurnRestrictionType restrictionType = TurnRestrictionType.fromTagValue(
+                        getIssuesModel().getEditorModel().getRestrictionTagValue());
                 if (restrictionType == null) return;
                 Way adjustedTo = TurnRestrictionBuilder.selectToWayAfterSplit(
@@ -162,18 +164,18 @@
                          restrictionType
                 );
-    
+
                 if (adjustedTo == null) return;
                 getIssuesModel().getEditorModel().setTurnRestrictionLeg(
                          TurnRestrictionLegRole.TO,
                          adjustedTo
-                );         
+                );
                 getIssuesModel().getEditorModel().getLayer().data.setSelected(
                            Arrays.asList(from, adjustedTo)
-                 );    
+                 );
             } else {
                 getIssuesModel().getEditorModel().getLayer().data.setSelected(
                            Arrays.asList(from, to)
                  );
-            }           
+            }
         }
     }
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/WrongTurnRestrictionLegTypeError.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/WrongTurnRestrictionLegTypeError.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/WrongTurnRestrictionLegTypeError.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.qa;
 
@@ -16,5 +17,5 @@
 /**
  * Issue if the type of a turn restriction leg is either an OSM node or an OSM relation.
- * 
+ *
  */
 public class WrongTurnRestrictionLegTypeError extends Issue {
@@ -23,9 +24,9 @@
 
     /**
-     * Create the issue 
-     * 
-     * @param parent the parent model 
+     * Create the issue
+     *
+     * @param parent the parent model
      * @param role the role of the turn restriction leg
-     * @param leg the leg 
+     * @param leg the leg
      */
     public WrongTurnRestrictionLegTypeError(IssuesModel parent, TurnRestrictionLegRole role, OsmPrimitive leg) {
@@ -38,7 +39,7 @@
 
     @Override
-    public String getText() {       
+    public String getText() {
         String msg = null;
-        switch(leg.getType()){
+        switch(leg.getType()) {
         case NODE:
             msg = tr(
@@ -52,6 +53,6 @@
                     leg.getDisplayName(DefaultNameFormatter.getInstance()),
                     role.toString()
-                );              
-            break;          
+                );
+            break;
         default:
             throw new AssertionError("Unexpected type for leg: "+leg.getType());
@@ -61,12 +62,14 @@
 
     class DeleteAction extends AbstractAction {
-        public DeleteAction() {
+        DeleteAction() {
             putValue(NAME, tr("Delete"));
             putValue(SHORT_DESCRIPTION, tr("Delete the member from the turn restriction"));
         }
+
+        @Override
         public void actionPerformed(ActionEvent e) {
             RelationMemberEditorModel model = getIssuesModel().getEditorModel().getRelationMemberEditorModel();
-            switch(role){
-            case FROM: 
+            switch(role) {
+            case FROM:
                 model.setFromPrimitive(null);
                 break;
@@ -75,16 +78,18 @@
                 break;
             }
-        }       
+        }
     }
-    
+
     class FixInEditorAction extends AbstractAction {
-        public FixInEditorAction() {
+        FixInEditorAction() {
             putValue(NAME, tr("Fix in editor"));
             putValue(SHORT_DESCRIPTION, tr("Change to the Basic Editor and select a way"));
         }
+
+        @Override
         public void actionPerformed(ActionEvent e) {
             NavigationControler controler = getIssuesModel().getNavigationControler();
-            switch(role){
-            case FROM: 
+            switch(role) {
+            case FROM:
                 controler.gotoBasicEditor(BasicEditorFokusTargets.FROM);
                 break;
@@ -93,5 +98,5 @@
                 break;
             }
-        }       
+        }
     }
 }
Index: /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/AllUnitTests.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/AllUnitTests.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/AllUnitTests.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions;
 
Index: /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/AllEditorTests.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/AllEditorTests.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/AllEditorTests.java	(revision 32519)
@@ -1,8 +1,9 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.editor;
-
-import junit.framework.TestCase;
 
 import org.junit.runner.RunWith;
 import org.junit.runners.Suite;
+
+import junit.framework.TestCase;
 
 @RunWith(Suite.class)
Index: /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/BasicEditorPanelTest.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/BasicEditorPanelTest.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/BasicEditorPanelTest.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.editor;
 
@@ -11,6 +12,6 @@
 
 /**
- * Simple functional test for the layout / basic functionality of {@see BasicEditorPanel} 
- *   
+ * Simple functional test for the layout / basic functionality of {@see BasicEditorPanel}
+ *
  */
 @Ignore("no test")
@@ -19,32 +20,34 @@
     private TurnRestrictionEditorModel model;
     private DataSet ds;
-    
+
     public BasicEditorPanelTest() {
         ds = new DataSet();
-        OsmDataLayer layer =new OsmDataLayer(ds, "test",null);
-        // mock a controler 
+        OsmDataLayer layer = new OsmDataLayer(ds, "test", null);
+        // mock a controler
         NavigationControler controler = new NavigationControler() {
+            @Override
             public void gotoAdvancedEditor() {
             }
 
+            @Override
             public void gotoBasicEditor() {
             }
 
+            @Override
             public void gotoBasicEditor(BasicEditorFokusTargets focusTarget) {
-            }           
+            }
         };
         model = new TurnRestrictionEditorModel(layer, controler);
-        
+
         BasicEditorPanel panel = new BasicEditorPanel(model);
-        
+
         Container c = getContentPane();
         c.setLayout(new BorderLayout());
-        c.add(panel, BorderLayout.CENTER);      
-        setSize(600,600);
+        c.add(panel, BorderLayout.CENTER);
+        setSize(600, 600);
         setDefaultCloseOperation(EXIT_ON_CLOSE);
     }
-    
-    
-    static public void main(String args[]) {
+
+    public static void main(String[] args) {
         new BasicEditorPanelTest().setVisible(true);
     }
Index: /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionComboBoxTest.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionComboBoxTest.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionComboBoxTest.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.editor;
 
@@ -12,30 +13,33 @@
 
 /**
- * This is a simple test application to test the functionality/layout of 
+ * This is a simple test application to test the functionality/layout of
  * the {@see TurnRestrictionComboBox}
- * 
+ *
  */
 @Ignore("no test")
 public class TurnRestrictionComboBoxTest extends JFrame {
-    
+
     private TurnRestrictionEditorModel model;
     private DataSet ds = new DataSet();
-    
+
     protected void build() {
         ds = new DataSet();
-        OsmDataLayer layer =new OsmDataLayer(ds, "test",null);
-        // mock a controler 
+        OsmDataLayer layer = new OsmDataLayer(ds, "test", null);
+        // mock a controler
         NavigationControler controler = new NavigationControler() {
+            @Override
             public void gotoAdvancedEditor() {
             }
 
+            @Override
             public void gotoBasicEditor() {
             }
 
+            @Override
             public void gotoBasicEditor(BasicEditorFokusTargets focusTarget) {
-            }           
+            }
         };
         model = new TurnRestrictionEditorModel(layer, controler);
-        
+
         Container c = getContentPane();
         c.setLayout(new GridBagLayout());
@@ -44,20 +48,19 @@
         gc.fill = GridBagConstraints.HORIZONTAL;
         gc.weightx = 1.0;
-        
+
         TurnRestrictionComboBox cb = new TurnRestrictionComboBox(
                 new TurnRestrictionComboBoxModel(model)
         );
-        add(cb, gc);        
+        add(cb, gc);
     }
-    
+
     public TurnRestrictionComboBoxTest() {
         build();
-        setSize(600,600);
+        setSize(600, 600);
         setDefaultCloseOperation(EXIT_ON_CLOSE);
     }
-    
-    public static void main(String args[]) {
+
+    public static void main(String[] args) {
         new TurnRestrictionComboBoxTest().setVisible(true);
     }
-
 }
Index: /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditorTest.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditorTest.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditorTest.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.editor;
 
@@ -12,15 +13,15 @@
 @Ignore("no test")
 public class TurnRestrictionEditorTest extends JFrame {
-    
+
     public TurnRestrictionEditorTest() {
-        setSize(10,10);
+        setSize(10, 10);
         TurnRestrictionEditor editor = new TurnRestrictionEditor(this, new OsmDataLayer(new DataSet(), "test", null));
-        editor.setSize(600,600);
+        editor.setSize(600, 600);
         editor.setVisible(true);
-        
+
         setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
     }
-    
-    static public void main(String args[]) {
+
+    public static void main(String[] args) {
         new TurnRestrictionEditorTest().setVisible(true);
     }
Index: /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionLegEditorTest.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionLegEditorTest.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionLegEditorTest.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.editor;
 
@@ -30,10 +31,10 @@
 
 /**
- * Simple test application to test functionality and layout of the 
+ * Simple test application to test functionality and layout of the
  * {@see TurnRestrictionLegEditor}
  */
 @Ignore("no test")
 public class TurnRestrictionLegEditorTest extends JFrame {
-    
+
     private TurnRestrictionLegEditor editor;
     private TurnRestrictionEditorModel model;
@@ -41,18 +42,21 @@
     private DefaultListModel<OsmPrimitive> listModel;
     private DataSet dataSet;
-    
+
     protected JPanel buildLegEditorPanel() {
         DataSet ds = new DataSet();
-        OsmDataLayer layer =new OsmDataLayer(ds, "test",null);
-        // mock a controler 
+        OsmDataLayer layer = new OsmDataLayer(ds, "test", null);
+        // mock a controler
         NavigationControler controler = new NavigationControler() {
+            @Override
             public void gotoAdvancedEditor() {
             }
 
+            @Override
             public void gotoBasicEditor() {
             }
 
+            @Override
             public void gotoBasicEditor(BasicEditorFokusTargets focusTarget) {
-            }           
+            }
         };
         JPanel pnl = new JPanel(new GridBagLayout());
@@ -60,7 +64,7 @@
         gc.anchor = GridBagConstraints.NORTHWEST;
         gc.fill = GridBagConstraints.HORIZONTAL;
-        gc.weightx = 0.0;       
+        gc.weightx = 0.0;
         pnl.add(new JLabel("From"), gc);
-        
+
         gc.weightx = 1.0;
         gc.gridx = 1;
@@ -69,19 +73,20 @@
         model.populate(new Relation());
         pnl.add(editor = new TurnRestrictionLegEditor(model, TurnRestrictionLegRole.FROM), gc);
-        
+
         return pnl;
     }
-    
+
     protected JPanel buildObjectListPanel() {
         JPanel pnl = new JPanel(new BorderLayout());
         listModel = new DefaultListModel<>();
         pnl.add(new JScrollPane(lstObjects = new JList<>(listModel)), BorderLayout.CENTER);
-        lstObjects.setCellRenderer(new OsmPrimitivRenderer());      
-        
-        PrimitiveIdListProvider provider = new PrimitiveIdListProvider() {          
+        lstObjects.setCellRenderer(new OsmPrimitivRenderer());
+
+        PrimitiveIdListProvider provider = new PrimitiveIdListProvider() {
+            @Override
             public List<PrimitiveId> getSelectedPrimitiveIds() {
                 List<PrimitiveId> ret = new ArrayList<>();
-                int [] sel = lstObjects.getSelectedIndices();
-                for (int i: sel){
+                int[] sel = lstObjects.getSelectedIndices();
+                for (int i: sel) {
                     ret.add((lstObjects.getModel().getElementAt(i)).getPrimitiveId());
                 }
@@ -89,22 +94,22 @@
             }
         };
-        
+
         lstObjects.setTransferHandler(new PrimitiveIdListTransferHandler(provider));
         lstObjects.setDragEnabled(true);
         return pnl;
     }
-    
+
     protected void build() {
         Container c = getContentPane();
         c.setLayout(new GridBagLayout());
-        
+
         GridBagConstraints gc = new GridBagConstraints();
         gc.anchor = GridBagConstraints.NORTHWEST;
-        gc.fill = GridBagConstraints.HORIZONTAL;    
+        gc.fill = GridBagConstraints.HORIZONTAL;
         gc.insets = new Insets(20, 0, 20, 0);
-        gc.weightx = 1.0;       
+        gc.weightx = 1.0;
         gc.weighty = 0.0;
         add(buildLegEditorPanel(), gc);
-        
+
         gc.gridy = 1;
         gc.weightx = 1.0;
@@ -112,34 +117,34 @@
         gc.fill = GridBagConstraints.BOTH;
         add(buildObjectListPanel(), gc);
-        setSize(600,600);   
+        setSize(600, 600);
     }
-    
+
     protected void initForTest1() {
         Way w = new Way(1);
         w.put("name", "way-1");
-        
+
         editor.getModel().setTurnRestrictionLeg(TurnRestrictionLegRole.FROM, w);
     }
-    
+
     protected void initForTest2() {
         Way w = new Way(1);
-        w.put("name", "way-1");     
+        w.put("name", "way-1");
         dataSet.addPrimitive(w);
         editor.getModel().setTurnRestrictionLeg(TurnRestrictionLegRole.FROM, w);
-        
-        Node n = new Node(new LatLon(1,1));
+
+        Node n = new Node(new LatLon(1, 1));
         n.setOsmId(1, 1);
         n.put("name", "node.1");
         dataSet.addPrimitive(n);
         listModel.addElement(n);
-        
+
         w = new Way();
-        w.setOsmId(2,1);
+        w.setOsmId(2, 1);
         w.put("name", "way.1");
         dataSet.addPrimitive(w);
         listModel.addElement(w);
-        
+
         Relation r = new Relation();
-        r.setOsmId(3,1);
+        r.setOsmId(3, 1);
         r.put("name", "relation.1");
         dataSet.addPrimitive(r);
@@ -147,10 +152,10 @@
     }
 
-    public TurnRestrictionLegEditorTest(){
+    public TurnRestrictionLegEditorTest() {
         build();
         initForTest2();
     }
-    
-    static public void main(String args[]) {
+
+    public static void main(String[] args) {
         new TurnRestrictionLegEditorTest().setVisible(true);
     }
Index: /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/VehicleExceptionEditorTest.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/VehicleExceptionEditorTest.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/VehicleExceptionEditorTest.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.editor;
 
@@ -13,5 +14,5 @@
 /**
  * Simple test application to test the vehicle exception editor
- * 
+ *
  */
 @Ignore("no test")
@@ -20,5 +21,5 @@
     OsmDataLayer layer;
     VehicleExceptionEditor editor;
-    
+
     protected void build() {
         Container c = getContentPane();
@@ -26,36 +27,39 @@
         layer = new OsmDataLayer(new DataSet(), "test", null);
 
-        model = new TurnRestrictionEditorModel(layer, new MockNavigationControler());       
+        model = new TurnRestrictionEditorModel(layer, new MockNavigationControler());
         editor = new VehicleExceptionEditor(model);
         c.add(editor, BorderLayout.CENTER);
-        
+
         model.getTagEditorModel().add(new TagModel("except", "non-standard-value"));
     }
-    
-    public VehicleExceptionEditorTest(){
+
+    public VehicleExceptionEditorTest() {
         build();
         setDefaultCloseOperation(EXIT_ON_CLOSE);
-        setSize(500,500);       
+        setSize(500, 500);
     }
-    
-    public static void main(String args[]){
+
+    public static void main(String[] args) {
         new VehicleExceptionEditorTest().setVisible(true);
     }
-    
-    static private class MockNavigationControler implements NavigationControler{
 
+    private static class MockNavigationControler implements NavigationControler {
+
+        @Override
         public void gotoAdvancedEditor() {
             // TODO Auto-generated method stub
-            
+
         }
 
+        @Override
         public void gotoBasicEditor() {
             // TODO Auto-generated method stub
-            
+
         }
 
+        @Override
         public void gotoBasicEditor(BasicEditorFokusTargets focusTarget) {
             // TODO Auto-generated method stub
-            
+
         }
     }
Index: /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/ViaListTest.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/ViaListTest.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/ViaListTest.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.editor;
 
@@ -24,61 +25,64 @@
 @Ignore("no test")
 public class ViaListTest extends JFrame {
-    
+
     private TurnRestrictionEditorModel model;
-    
+
     protected void build() {
         DataSet ds = new DataSet();
-        OsmDataLayer layer =new OsmDataLayer(ds, "test", null);
-        // mock a controler 
+        OsmDataLayer layer = new OsmDataLayer(ds, "test", null);
+        // mock a controler
         NavigationControler controler = new NavigationControler() {
+            @Override
             public void gotoAdvancedEditor() {
             }
 
+            @Override
             public void gotoBasicEditor() {
             }
 
+            @Override
             public void gotoBasicEditor(BasicEditorFokusTargets focusTarget) {
-            }           
+            }
         };
         model = new TurnRestrictionEditorModel(layer, controler);
         Container c = getContentPane();
-        
+
         c.setLayout(new GridBagLayout());
         GridBagConstraints gc = new GridBagConstraints();
         gc.anchor = GridBagConstraints.NORTHWEST;
-        gc.insets = new Insets(5,5,5,20);
+        gc.insets = new Insets(5, 5, 5, 20);
         gc.fill = GridBagConstraints.BOTH;
         gc.weightx = 0.5;
         gc.weighty = 1.0;
-        
+
         DefaultListSelectionModel selectionModel = new DefaultListSelectionModel();
         c.add(new ViaList(new ViaListModel(model, selectionModel), selectionModel), gc);
-        
+
         gc.gridx = 1;
         c.add(new JList<>(), gc);
-        
-        setSize(600,600);       
+
+        setSize(600, 600);
         setDefaultCloseOperation(EXIT_ON_CLOSE);
     }
-    
+
     protected void initTest1() {
         DataSet ds = new DataSet();
         Relation r = new Relation();
         Node n;
-        for (int i = 1; i<10; i++){
-            n = new Node(new LatLon(i,i));  
+        for (int i = 1; i < 10; i++) {
+            n = new Node(new LatLon(i, i));
             n.put("name", "node." + i);
             ds.addPrimitive(n);
-            r.addMember(new RelationMember("via",n));
-        }       
+            r.addMember(new RelationMember("via", n));
+        }
         model.populate(r);
     }
-    
+
     public ViaListTest() {
-        build();        
+        build();
         initTest1();
     }
-    
-    static public void main(String args[]) {
+
+    public static void main(String[] args) {
         new ViaListTest().setVisible(true);
     }
Index: /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/qa/IssuesViewTest.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/qa/IssuesViewTest.java	(revision 32518)
+++ /applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/qa/IssuesViewTest.java	(revision 32519)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.turnrestrictions.qa;
 
@@ -22,18 +23,21 @@
 public class IssuesViewTest extends JFrame {
     private IssuesModel model;
-    
+
     protected void build() {
         Container c = getContentPane();
         c.setLayout(new GridBagLayout());
-        // mock a controler 
+        // mock a controler
         NavigationControler controler = new NavigationControler() {
+            @Override
             public void gotoAdvancedEditor() {
             }
 
+            @Override
             public void gotoBasicEditor() {
             }
 
+            @Override
             public void gotoBasicEditor(BasicEditorFokusTargets focusTarget) {
-            }           
+            }
         };
         OsmDataLayer layer = new OsmDataLayer(new DataSet(), "test", null);
@@ -49,5 +53,5 @@
         pane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
         c.add(pane, gc);
-        
+
         List<Issue> issues = new ArrayList<>();
         issues.add(new RequiredTagMissingError(model, "type", "restriction"));
@@ -55,12 +59,12 @@
         model.populate(issues);
     }
-    
+
     public IssuesViewTest() {
         setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
-        setSize(400,600);
+        setSize(400, 600);
         build();
     }
-    
-    public static void main(String args[]) {
+
+    public static void main(String[] args) {
         new IssuesViewTest().setVisible(true);
     }
