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 23252)
+++ applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/CreateOrEditTurnRestrictionAction.java	(revision 23254)
@@ -22,18 +22,18 @@
 
 /**
- * This action is triggered by a global shortcut (default is Shift-Ctrl-T on windows). 
+ * This action is triggered by a global shortcut (default is Shift-Ctrl-T on windows).
  * Depending on the current selection it either launches an editor for a new turn
  * restriction or a popup component from which one can choose a turn restriction to
- * edit. 
+ * edit.
  *
  */
 public class CreateOrEditTurnRestrictionAction extends JosmAction {
     static private final Logger logger = Logger.getLogger(CreateOrEditTurnRestrictionAction.class.getName());
-    
+
     /**
      * Installs the global key stroke with which creating/editing a turn restriction
      * is triggered.
-     * 
-     * @param keyStroke the key stroke 
+     *
+     * @param keyStroke the key stroke
      */
     static public void install(KeyStroke keyStroke){
@@ -41,5 +41,5 @@
         Object actionMapKey = im.get(keyStroke);
         if (actionMapKey != null && !actionMapKey.toString().equals("turnrestrictions:create-or-edit")) {
-            System.out.println(tr("Warning: turnrestrictions plugin replaces already existing action ''{0}'' behind shortcut ''{1}'' by action ''{2}''", actionMapKey.toString(), keyStroke.toString(), "turnrestrictions:create-or-edit"));            
+            System.out.println(tr("Warning: turnrestrictions plugin replaces already existing action ''{0}'' behind shortcut ''{1}'' by action ''{2}''", actionMapKey.toString(), keyStroke.toString(), "turnrestrictions:create-or-edit"));
         }
         KeyStroke[] keys = im.keys();
@@ -55,9 +55,9 @@
         am.put("turnrestrictions:create-or-edit", getInstance());
     }
-    
+
     /**
      * Installs  global key stroke configured in the preferences.
-     * 
-     * @param keyStroke the key stroke 
+     *
+     * @param keyStroke the key stroke
      */
     static public void install(){
@@ -70,11 +70,11 @@
         install(key);
     }
-    
+
     /** the singleton instance of this action */
     private static CreateOrEditTurnRestrictionAction instance;
-    
+
     /**
      * Replies the unique instance of this action
-     * 
+     *
      * @return
      */
@@ -85,5 +85,5 @@
         return instance;
     }
-    
+
     protected CreateOrEditTurnRestrictionAction() {
         super(
@@ -91,17 +91,16 @@
             null,
             tr("Create or edit a turn restriction."),
-            null, // shortcut is going to be registered later 
-            false 
+            null, // shortcut is going to be registered later
+            false
         );
-    }   
-    
+    }
+
     public void actionPerformed(ActionEvent e) {
         OsmDataLayer layer = Main.main.getEditLayer();
         if (layer == null) return;
         Collection<Relation> trs = TurnRestrictionSelectionPopupPanel.getTurnRestrictionsParticipatingIn(layer.data.getSelected());
-        if (layer == null) return;
         if (trs.isEmpty()){
             // current selection isn't participating in turn restrictions. Launch
-            // an editor for a new turn restriction 
+            // an editor for a new turn restriction
             //
             Relation tr = new TurnRestrictionBuilder().buildFromSelection(layer);
@@ -112,5 +111,5 @@
         } else {
             // let the user choose whether he wants to create a new turn restriction or
-            // edit one of the turn restrictions participating in the current selection 
+            // edit one of the turn restrictions participating in the current selection
             TurnRestrictionSelectionPopupPanel pnl = new TurnRestrictionSelectionPopupPanel(
                     layer
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 23252)
+++ applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/AdvancedEditorPanel.java	(revision 23254)
@@ -1,6 +1,7 @@
 package org.openstreetmap.josm.plugins.turnrestrictions.editor;
 
+import static org.openstreetmap.josm.tools.I18n.tr;
+
 import java.awt.BorderLayout;
-
 import java.awt.event.HierarchyEvent;
 import java.awt.event.HierarchyListener;
@@ -16,5 +17,4 @@
 import org.openstreetmap.josm.gui.widgets.HtmlPanel;
 import org.openstreetmap.josm.tools.CheckParameterUtil;
-import static org.openstreetmap.josm.tools.I18n.tr;
 
 /**
@@ -26,12 +26,12 @@
 
     private TurnRestrictionEditorModel model;
-    private TagEditorPanel pnlTagEditor; 
+    private TagEditorPanel pnlTagEditor;
     private JPanel pnlRelationMemberEditor;
     private JTable tblRelationMemberEditor;
     private JSplitPane spEditors;
-    
+
     /**
-     * Creates the panel with the tag editor 
-     * 
+     * Creates the panel with the tag editor
+     *
      * @return
      */
@@ -39,5 +39,5 @@
         JPanel pnl = new JPanel(new BorderLayout());
         HtmlPanel msg = new HtmlPanel();
-        msg.setText("<html><body>" + 
+        msg.setText("<html><body>" +
                 tr("In the following table you can edit the <strong>raw tags</strong>"
               + " of the OSM relation representing this turn restriction.")
@@ -45,13 +45,13 @@
         );
         pnl.add(msg, BorderLayout.NORTH);
-        pnlTagEditor = new TagEditorPanel(model.getTagEditorModel());   
+        pnlTagEditor = new TagEditorPanel(model.getTagEditorModel(), null);
         pnlTagEditor.initAutoCompletion(model.getLayer());
         pnl.add(pnlTagEditor, BorderLayout.CENTER);
         return pnl;
     }
-    
+
     /**
      * Builds the panel with the table for editing relation members
-     * 
+     *
      * @return
      */
@@ -59,10 +59,10 @@
         JPanel pnl = new JPanel(new BorderLayout());
         HtmlPanel msg = new HtmlPanel();
-        msg.setText("<html><body>"  
+        msg.setText("<html><body>"
               + tr("In the following table you can edit the <strong>raw members</strong>"
               + " of the OSM relation representing this turn restriction.") + "</body></html>"
         );
         pnl.add(msg, BorderLayout.NORTH);
-        
+
         tblRelationMemberEditor = new RelationMemberTable(model);
         JScrollPane pane = new JScrollPane(tblRelationMemberEditor);
@@ -72,7 +72,7 @@
         return pnl;
     }
-    
+
     /**
-     * Creates the main split panel 
+     * Creates the main split panel
      * @return
      */
@@ -86,5 +86,5 @@
         return spEditors;
     }
-    
+
     /**
      * Builds the user interface
@@ -94,8 +94,8 @@
         add(buildSplitPane(), BorderLayout.CENTER);
     }
-    
+
     /**
      * Creates the advanced editor
-     * 
+     *
      * @param model the editor model. Must not be null.
      * @throws IllegalArgumentException thrown if model is null
@@ -107,8 +107,8 @@
         HelpUtil.setHelpContext(this, HelpUtil.ht("/Plugins/turnrestrictions#AdvancedEditor"));
     }
-    
+
     /**
      * Initializes the divider location when the components becomes visible the
-     * first time 
+     * first time
      */
     class SplitPaneDividerInitializer implements HierarchyListener {
@@ -117,6 +117,6 @@
                 spEditors.setDividerLocation(0.5);
                 spEditors.removeHierarchyListener(this);
-            }           
-        }       
+            }
+        }
     }
 }
