Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java	(revision 14029)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java	(revision 14030)
@@ -613,5 +613,5 @@
         /**
          * Constructs a new {@code LeftButtonToolbar}.
-         * @param re relation editor
+         * @param editorAccess relation editor
          */
         LeftButtonToolbar(IRelationEditorActionAccess editorAccess) {
@@ -650,7 +650,10 @@
 
             InputMap inputMap = editorAccess.getMemberTable().getInputMap(MemberTable.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
-            inputMap.put((KeyStroke) new RemoveAction(editorAccess, "removeSelected").getValue(AbstractAction.ACCELERATOR_KEY), "removeSelected");
-            inputMap.put((KeyStroke) new MoveUpAction(editorAccess, "moveUp").getValue(AbstractAction.ACCELERATOR_KEY), "moveUp");
-            inputMap.put((KeyStroke) new MoveDownAction(editorAccess, "moveDown").getValue(AbstractAction.ACCELERATOR_KEY), "moveDown");
+            inputMap.put((KeyStroke) new RemoveAction(editorAccess, "removeSelected")
+                    .getValue(AbstractAction.ACCELERATOR_KEY), "removeSelected");
+            inputMap.put((KeyStroke) new MoveUpAction(editorAccess, "moveUp")
+                    .getValue(AbstractAction.ACCELERATOR_KEY), "moveUp");
+            inputMap.put((KeyStroke) new MoveDownAction(editorAccess, "moveDown")
+                    .getValue(AbstractAction.ACCELERATOR_KEY), "moveDown");
             inputMap.put((KeyStroke) new DownloadIncompleteMembersAction(
                     editorAccess, "downloadIncomplete").getValue(AbstractAction.ACCELERATOR_KEY), "downloadIncomplete");
@@ -660,8 +663,5 @@
     /**
      * build the toolbar with the buttons for adding or removing the current selection
-     * @param memberTable member table
-     * @param memberTableModel member table model
-     * @param selectionTableModel selection table model
-     * @param re relation editor
+     * @param editorAccess relation editor
      *
      * @return control buttons panel for selection/members
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationEditorHooks.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationEditorHooks.java	(revision 14029)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationEditorHooks.java	(revision 14030)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.gui.dialogs.relation;
 
@@ -9,10 +10,10 @@
 /**
  * This class allows to hook into the relation editor. It can be used to overwrite specific behavior.
- * 
+ *
  * @author Michael Zangl
  * @since 14027
  */
-public class RelationEditorHooks {
-    
+public final class RelationEditorHooks {
+
     private static final CopyOnWriteArrayList<IRelationEditorActionGroup> memberActions = new CopyOnWriteArrayList<>();
     private static final CopyOnWriteArrayList<IRelationEditorActionGroup> selectionActions = new CopyOnWriteArrayList<>();
@@ -21,5 +22,5 @@
         // only static methods.
     }
-    
+
     /**
      * Adds actions to the members action toolbar
@@ -29,5 +30,5 @@
         memberActions.add(group);
     }
-    
+
     /**
      * Adds actions to the selection action toolbar
@@ -37,12 +38,12 @@
         selectionActions.add(group);
     }
-    
+
     /* package */ static List<IRelationEditorActionGroup> getMemberActions() {
         return Collections.unmodifiableList(memberActions);
     }
-    
+
     /* package */ static List<IRelationEditorActionGroup> getSelectActions() {
         return Collections.unmodifiableList(selectionActions);
     }
-    
+
 }
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/AbstractRelationEditorAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/AbstractRelationEditorAction.java	(revision 14029)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/AbstractRelationEditorAction.java	(revision 14030)
@@ -26,5 +26,5 @@
 /**
  * Abstract superclass of relation editor actions.
- * 
+ *
  * @since 9496
  */
@@ -36,9 +36,7 @@
     /**
      * Create a new relation editor action
-     * 
+     *
      * @param editorAccess
      *            The editor this action is for
-     * @param actionMapKey
-     *            The key for the member table action map.
      * @param updateOn
      *            The events that may cause the enabled state of this button to
@@ -57,5 +55,5 @@
     /**
      * Create a new relation editor action
-     * 
+     *
      * @param editorAccess
      *            The editor this action is for
@@ -127,4 +125,9 @@
     }
 
+    /**
+     * Indicates that this action only visible in expert mode
+     * @return <code>true</code> for expert mode actions.
+     * @since 14027
+     */
     public boolean isExpertOnly() {
         return false;
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/AddFromSelectionAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/AddFromSelectionAction.java	(revision 14029)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/AddFromSelectionAction.java	(revision 14030)
@@ -34,5 +34,6 @@
         ConditionalOptionPaneUtil.startBulkOperation("add_primitive_to_relation");
         for (OsmPrimitive primitive : primitives) {
-            if (primitive instanceof Relation && editorAccess.getEditor().getRelation() != null && editorAccess.getEditor().getRelation().equals(primitive)) {
+            if (primitive instanceof Relation
+                    && editorAccess.getEditor().getRelation() != null && editorAccess.getEditor().getRelation().equals(primitive)) {
                 GenericRelationEditor.warnOfCircularReferences(primitive);
                 continue;
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/AddSelectedAfterSelection.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/AddSelectedAfterSelection.java	(revision 14029)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/AddSelectedAfterSelection.java	(revision 14030)
@@ -19,7 +19,5 @@
     /**
      * Constructs a new {@code AddSelectedAfterSelection}.
-     * @param memberTableModel member table model
-     * @param selectionTableModel selection table model
-     * @param editor relation editor
+     * @param editorAccess An interface to access the relation editor contents.
      */
     public AddSelectedAfterSelection(IRelationEditorActionAccess editorAccess) {
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/AddSelectedAtEndAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/AddSelectedAtEndAction.java	(revision 14029)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/AddSelectedAtEndAction.java	(revision 14030)
@@ -19,7 +19,5 @@
     /**
      * Constructs a new {@code AddSelectedAtEndAction}.
-     * @param memberTableModel member table model
-     * @param selectionTableModel selection table model
-     * @param editor relation editor
+     * @param editorAccess An interface to access the relation editor contents.
      */
     public AddSelectedAtEndAction(IRelationEditorActionAccess editorAccess) {
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/AddSelectedAtStartAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/AddSelectedAtStartAction.java	(revision 14029)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/AddSelectedAtStartAction.java	(revision 14030)
@@ -19,7 +19,5 @@
     /**
      * Constructs a new {@code AddSelectedAtStartAction}.
-     * @param memberTableModel member table model
-     * @param selectionTableModel selection table model
-     * @param editor relation editor
+     * @param editorAccess An interface to access the relation editor contents.
      */
     public AddSelectedAtStartAction(IRelationEditorActionAccess editorAccess) {
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/AddSelectedBeforeSelection.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/AddSelectedBeforeSelection.java	(revision 14029)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/AddSelectedBeforeSelection.java	(revision 14030)
@@ -19,7 +19,5 @@
     /**
      * Constructs a new {@code AddSelectedBeforeSelection}.
-     * @param memberTableModel member table model
-     * @param selectionTableModel selection table model
-     * @param editor relation editor
+     * @param editorAccess An interface to access the relation editor contents.
      */
     public AddSelectedBeforeSelection(IRelationEditorActionAccess editorAccess) {
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/ApplyAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/ApplyAction.java	(revision 14029)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/ApplyAction.java	(revision 14030)
@@ -17,9 +17,5 @@
     /**
      * Constructs a new {@code ApplyAction}.
-     * @param memberTable member table
-     * @param memberTableModel member table model
-     * @param layer OSM data layer
-     * @param editor relation editor
-     * @param tagModel tag editor model
+     * @param editorAccess An interface to access the relation editor contents.
      */
     public ApplyAction(IRelationEditorActionAccess editorAccess) {
@@ -28,5 +24,5 @@
         new ImageProvider("save").getResource().attachImageIcon(this, true);
         putValue(NAME, tr("Apply"));
-        updateEnabledState();        
+        updateEnabledState();
     }
 
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/CancelAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/CancelAction.java	(revision 14029)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/CancelAction.java	(revision 14030)
@@ -26,10 +26,5 @@
     /**
      * Constructs a new {@code CancelAction}.
-     * @param memberTable member table
-     * @param memberTableModel member table model
-     * @param tagModel tag editor model
-     * @param layer OSM data layer
-     * @param editor relation editor
-     * @param tfRole role text field
+     * @param editorAccess An interface to access the relation editor contents.
      */
     public CancelAction(IRelationEditorActionAccess editorAccess) {
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/CopyMembersAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/CopyMembersAction.java	(revision 14029)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/CopyMembersAction.java	(revision 14030)
@@ -18,7 +18,5 @@
     /**
      * Constructs a new {@code CopyMembersAction}.
-     * @param memberTableModel member table model
-     * @param layer OSM data layer
-     * @param editor relation editor
+     * @param editorAccess An interface to access the relation editor contents.
      */
     public CopyMembersAction(IRelationEditorActionAccess editorAccess) {
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/DeleteCurrentRelationAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/DeleteCurrentRelationAction.java	(revision 14029)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/DeleteCurrentRelationAction.java	(revision 14030)
@@ -6,5 +6,4 @@
 import java.awt.event.ActionEvent;
 import java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
 
 import org.openstreetmap.josm.actions.mapmode.DeleteAction;
@@ -17,11 +16,10 @@
  * @since 9496
  */
-public class DeleteCurrentRelationAction extends AbstractRelationEditorAction implements PropertyChangeListener {
+public class DeleteCurrentRelationAction extends AbstractRelationEditorAction {
     private static final long serialVersionUID = 1L;
 
     /**
      * Constructs a new {@code DeleteCurrentRelationAction}.
-     * @param layer OSM data layer
-     * @param editor relation editor
+     * @param editorAccess An interface to access the relation editor contents.
      */
     public DeleteCurrentRelationAction(IRelationEditorActionAccess editorAccess) {
@@ -48,4 +46,5 @@
     @Override
     public void propertyChange(PropertyChangeEvent evt) {
+        // Do not call super.
         if (GenericRelationEditor.RELATION_SNAPSHOT_PROP.equals(evt.getPropertyName())) {
             updateEnabledState();
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/DownloadIncompleteMembersAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/DownloadIncompleteMembersAction.java	(revision 14029)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/DownloadIncompleteMembersAction.java	(revision 14030)
@@ -23,9 +23,6 @@
     /**
      * Constructs a new {@code DownloadIncompleteMembersAction}.
-     * @param memberTable member table
-     * @param memberTableModel member table model
+     * @param editorAccess An interface to access the relation editor contents.
      * @param actionMapKey action map key
-     * @param layer OSM data layer
-     * @param editor relation editor
      */
     public DownloadIncompleteMembersAction(IRelationEditorActionAccess editorAccess, String actionMapKey) {
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/DownloadSelectedIncompleteMembersAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/DownloadSelectedIncompleteMembersAction.java	(revision 14029)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/DownloadSelectedIncompleteMembersAction.java	(revision 14030)
@@ -20,9 +20,5 @@
     /**
      * Constructs a new {@code DownloadSelectedIncompleteMembersAction}.
-     * @param memberTable member table
-     * @param memberTableModel member table model
-     * @param actionMapKey action map key
-     * @param layer OSM data layer
-     * @param editor relation editor
+     * @param editorAccess An interface to access the relation editor contents.
      */
     public DownloadSelectedIncompleteMembersAction(IRelationEditorActionAccess editorAccess) {
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/DuplicateRelationAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/DuplicateRelationAction.java	(revision 14029)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/DuplicateRelationAction.java	(revision 14030)
@@ -20,7 +20,5 @@
     /**
      * Constructs a new {@code DuplicateRelationAction}.
-     * @param memberTableModel member table model
-     * @param tagEditorModel tag editor model
-     * @param layer OSM data layer
+     * @param editorAccess An interface to access the relation editor contents.
      */
     public DuplicateRelationAction(IRelationEditorActionAccess editorAccess) {
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/EditAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/EditAction.java	(revision 14029)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/EditAction.java	(revision 14030)
@@ -23,7 +23,5 @@
     /**
      * Constructs a new {@code EditAction}.
-     * @param memberTable member table
-     * @param memberTableModel member table model
-     * @param layer layer
+     * @param editorAccess An interface to access the relation editor contents.
      */
     public EditAction(IRelationEditorActionAccess editorAccess) {
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/IRelationEditorActionAccess.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/IRelationEditorActionAccess.java	(revision 14029)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/IRelationEditorActionAccess.java	(revision 14030)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.gui.dialogs.relation.actions;
 
@@ -14,5 +15,5 @@
  * This interface provides access to the relation editor for actions.
  * <p>
- * 
+ *
  * @author Michael Zangl
  * @since 14027
@@ -34,5 +35,5 @@
      */
     MemberTable getMemberTable();
-    
+
     /**
      * Get the model the member table is using.
@@ -40,5 +41,5 @@
      */
     MemberTableModel getMemberTableModel();
-    
+
     /**
      * Get the table that displays the current user selection
@@ -46,5 +47,5 @@
      */
     SelectionTable getSelectionTable();
-    
+
     /**
      * Get the model that the selection table is based on.
@@ -52,8 +53,17 @@
      */
     SelectionTableModel getSelectionTableModel();
-    
+
+    /**
+     * Get the current relation editor
+     * @return The relation editor object.
+     */
     IRelationEditor getEditor();
+
+    /**
+     * Gets the model for the tag table.
+     * @return The tag editor model.
+     */
     TagEditorModel getTagModel();
-    
+
     /**
      * Get the text field that is used to edit the role.
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/IRelationEditorActionGroup.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/IRelationEditorActionGroup.java	(revision 14029)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/IRelationEditorActionGroup.java	(revision 14030)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.gui.dialogs.relation.actions;
 
@@ -11,5 +12,5 @@
 /**
  * An action group for the relation editor, to be used in one of the tool bars.
- * 
+ *
  * @author Michael Zangl
  * @since 14027
@@ -19,5 +20,5 @@
     /**
      * Get the position at which the action group should be added.
-     * 
+     *
      * @return The order index, default is to add at the end.
      */
@@ -28,5 +29,5 @@
     /**
      * Get the actions in this action group.
-     * 
+     *
      * @param editorAccess
      *            Methods to access the relation editor.
@@ -35,4 +36,12 @@
     List<AbstractRelationEditorAction> getActions(IRelationEditorActionAccess editorAccess);
 
+    /**
+     * Fills the toolbar with some action groups.
+     * <p>
+     * Groups are sorted by their ordered index and expert buttons are hidden in non-expert mode.
+     * @param toolbar The toolbar to add the buttons to.
+     * @param groups An unordered list of action groups.
+     * @param editorAccess The relation editor
+     */
     static void fillToolbar(JToolBar toolbar, List<IRelationEditorActionGroup> groups,
             IRelationEditorActionAccess editorAccess) {
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/IRelationEditorUpdateOn.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/IRelationEditorUpdateOn.java	(revision 14029)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/IRelationEditorUpdateOn.java	(revision 14030)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.gui.dialogs.relation.actions;
 
@@ -6,5 +7,5 @@
  * <p>
  * It holds common constants that are often used.
- * 
+ *
  * @author Michael Zangl
  * @since 14027
@@ -23,8 +24,20 @@
             .addListSelectionListener(action);
 
+    /**
+     * Update when a tag of the relation changed
+     */
     IRelationEditorUpdateOn TAG_CHANGE = (editor, action) -> editor.getTagModel().addPropertyChangeListener(action);
+
+    /**
+     * Update when a relation changed
+     */
     IRelationEditorUpdateOn SELECTION_TABLE_CHANGE = (editor, action) -> editor.getSelectionTableModel()
             .addTableModelListener(action);
 
+    /**
+     * Registers the given action as listener on the relation editor.
+     * @param editor The relation editor to register the listeners on
+     * @param action The action that should be registered
+     */
     void register(IRelationEditorActionAccess editor, AbstractRelationEditorAction action);
 }
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/MoveDownAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/MoveDownAction.java	(revision 14029)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/MoveDownAction.java	(revision 14030)
@@ -20,6 +20,5 @@
     /**
      * Constructs a new {@code MoveDownAction}.
-     * @param memberTable member table
-     * @param memberTableModel member table model
+     * @param editorAccess An interface to access the relation editor contents.
      * @param actionMapKey action map key
      */
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/MoveUpAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/MoveUpAction.java	(revision 14029)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/MoveUpAction.java	(revision 14030)
@@ -20,7 +20,6 @@
     /**
      * Constructs a new {@code MoveUpAction}.
-     * @param memberTable member table
-     * @param memberTableModel member table model
-     * @param actionMapKey key in table action map
+     * @param editorAccess An interface to access the relation editor contents.
+     * @param actionMapKey action map key
      */
     public MoveUpAction(IRelationEditorActionAccess editorAccess, String actionMapKey) {
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/OKAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/OKAction.java	(revision 14029)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/OKAction.java	(revision 14030)
@@ -17,10 +17,5 @@
     /**
      * Constructs a new {@code OKAction}.
-     * @param memberTable member table
-     * @param memberTableModel member table model
-     * @param tagModel tag editor model
-     * @param layer OSM data layer
-     * @param editor relation editor
-     * @param tfRole role text field
+     * @param editorAccess An interface to access the relation editor contents.
      */
     public OKAction(IRelationEditorActionAccess editorAccess) {
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/PasteMembersAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/PasteMembersAction.java	(revision 14029)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/PasteMembersAction.java	(revision 14030)
@@ -22,7 +22,5 @@
     /**
      * Constructs a new {@code PasteMembersAction}.
-     * @param memberTable member table
-     * @param layer OSM data layer
-     * @param editor relation editor
+     * @param editorAccess An interface to access the relation editor contents.
      */
     public PasteMembersAction(IRelationEditorActionAccess editorAccess) {
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/RefreshAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/RefreshAction.java	(revision 14029)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/RefreshAction.java	(revision 14030)
@@ -9,4 +9,5 @@
 import javax.swing.JComponent;
 import javax.swing.JOptionPane;
+import javax.swing.JRootPane;
 
 import org.openstreetmap.josm.Main;
@@ -16,4 +17,5 @@
 import org.openstreetmap.josm.gui.HelpAwareOptionPane.ButtonSpec;
 import org.openstreetmap.josm.gui.MainApplication;
+import org.openstreetmap.josm.gui.dialogs.relation.IRelationEditor;
 import org.openstreetmap.josm.tools.ImageProvider;
 import org.openstreetmap.josm.tools.Shortcut;
@@ -28,9 +30,5 @@
     /**
      * Constructs a new {@code RefreshAction}.
-     * @param memberTable member table
-     * @param memberTableModel member table model
-     * @param layer OSM data layer
-     * @param editor relation editor
-     * @param tagModel tag editor model
+     * @param editorAccess An interface to access the relation editor contents.
      */
     public RefreshAction(IRelationEditorActionAccess editorAccess) {
@@ -42,7 +40,9 @@
         new ImageProvider("dialogs/refresh").getResource().attachImageIcon(this, true);
         putValue(NAME, tr("Refresh"));
-        if (editorAccess.getEditor() instanceof JComponent) {
-            ((JComponent) editorAccess.getEditor()).getRootPane().getActionMap().put("refresh", this);
-            ((JComponent) editorAccess.getEditor()).getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(sc.getKeyStroke(), "refresh");
+        IRelationEditor editor = editorAccess.getEditor();
+        if (editor instanceof JComponent) {
+            JRootPane rootPane = ((JComponent) editorAccess.getEditor()).getRootPane();
+            rootPane.getActionMap().put("refresh", this);
+            rootPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(sc.getKeyStroke(), "refresh");
         }
         MainApplication.undoRedo.addCommandQueueListener(this);
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/RemoveAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/RemoveAction.java	(revision 14029)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/RemoveAction.java	(revision 14030)
@@ -20,6 +20,5 @@
     /**
      * Constructs a new {@code RemoveAction}.
-     * @param memberTable member table
-     * @param memberTableModel member table model
+     * @param editorAccess An interface to access the relation editor contents.
      * @param actionMapKey action map key
      */
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/RemoveSelectedAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/RemoveSelectedAction.java	(revision 14029)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/RemoveSelectedAction.java	(revision 14030)
@@ -18,7 +18,5 @@
     /**
      * Constructs a new {@code RemoveSelectedAction}.
-     * @param memberTableModel member table model
-     * @param selectionTableModel selection table model
-     * @param layer OSM data layer
+     * @param editorAccess An interface to access the relation editor contents.
      */
     public RemoveSelectedAction(IRelationEditorActionAccess editorAccess) {
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/ReverseAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/ReverseAction.java	(revision 14029)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/ReverseAction.java	(revision 14030)
@@ -17,5 +17,5 @@
     /**
      * Constructs a new {@code ReverseAction}.
-     * @param editorAccess
+     * @param editorAccess An interface to access the relation editor contents.
      */
     public ReverseAction(IRelationEditorActionAccess editorAccess) {
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/SelectAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/SelectAction.java	(revision 14029)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/SelectAction.java	(revision 14030)
@@ -18,6 +18,5 @@
     /**
      * Constructs a new {@code SelectAction}.
-     * @param layer OSM data layer
-     * @param editor relation editor
+     * @param editorAccess An interface to access the relation editor contents.
      */
     public SelectAction(IRelationEditorActionAccess editorAccess) {
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/SelectPrimitivesForSelectedMembersAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/SelectPrimitivesForSelectedMembersAction.java	(revision 14029)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/SelectPrimitivesForSelectedMembersAction.java	(revision 14030)
@@ -18,7 +18,5 @@
     /**
      * Select objects for selected relation members.
-     * @param memberTable member table
-     * @param memberTableModel member table model
-     * @param layer layer
+     * @param editorAccess An interface to access the relation editor contents.
      */
     public SelectPrimitivesForSelectedMembersAction(IRelationEditorActionAccess editorAccess) {
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/SelectedMembersForSelectionAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/SelectedMembersForSelectionAction.java	(revision 14029)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/SelectedMembersForSelectionAction.java	(revision 14030)
@@ -17,7 +17,5 @@
     /**
      * Constructs a new {@code SelectedMembersForSelectionAction}.
-     * @param memberTableModel member table model
-     * @param selectionTableModel selection table model
-     * @param layer OSM data layer
+     * @param editorAccess An interface to access the relation editor contents.
      */
     public SelectedMembersForSelectionAction(IRelationEditorActionAccess editorAccess) {
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/SetRoleAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/SetRoleAction.java	(revision 14029)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/SetRoleAction.java	(revision 14030)
@@ -27,7 +27,5 @@
     /**
      * Constructs a new {@code SetRoleAction}.
-     * @param memberTable member table
-     * @param memberTableModel member table model
-     * @param tfRole role text field
+     * @param editorAccess An interface to access the relation editor contents.
      */
     public SetRoleAction(IRelationEditorActionAccess editorAccess) {
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/SortAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/SortAction.java	(revision 14029)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/SortAction.java	(revision 14030)
@@ -20,6 +20,5 @@
     /**
      * Constructs a new {@code SortAction}.
-     * @param memberTable member table
-     * @param memberTableModel member table model
+     * @param editorAccess An interface to access the relation editor contents.
      */
     public SortAction(IRelationEditorActionAccess editorAccess) {
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/SortBelowAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/SortBelowAction.java	(revision 14029)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/SortBelowAction.java	(revision 14030)
@@ -17,6 +17,5 @@
     /**
      * Constructs a new {@code SortBelowAction}.
-     * @param memberTable member table
-     * @param memberTableModel member table model
+     * @param editorAccess An interface to access the relation editor contents.
      */
     public SortBelowAction(IRelationEditorActionAccess editorAccess) {
@@ -35,7 +34,8 @@
     @Override
     protected void updateEnabledState() {
-        setEnabled(editorAccess.getMemberTableModel().getRowCount() > 0 && !editorAccess.getMemberTableModel().getSelectionModel().isSelectionEmpty());
+        setEnabled(editorAccess.getMemberTableModel().getRowCount() > 0
+                && !editorAccess.getMemberTableModel().getSelectionModel().isSelectionEmpty());
     }
-    
+
     @Override
     public boolean isExpertOnly() {
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/RelationNodeMap.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/RelationNodeMap.java	(revision 14029)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/RelationNodeMap.java	(revision 14030)
@@ -31,4 +31,6 @@
 public class RelationNodeMap {
 
+    private static final String ROLE_BACKWARD = "backward";
+
     private static class NodesWays {
         public final Map<Node, Set<Integer>> nodes = new TreeMap<>();
@@ -62,7 +64,12 @@
     private final List<Integer> notSortable = new ArrayList<>();
 
+    /**
+     * Gets the start node of the member, respecting the direction role.
+     * @param m The relation member.
+     * @return <code>null</code> if the member is no way, the node otherwise.
+     */
     public static Node firstOnewayNode(RelationMember m) {
         if (!m.isWay()) return null;
-        if ("backward".equals(m.getRole())) {
+        if (ROLE_BACKWARD.equals(m.getRole())) {
             return m.getWay().lastNode();
         }
@@ -70,7 +77,12 @@
     }
 
+    /**
+     * Gets the end node of the member, respecting the direction role.
+     * @param m The relation member.
+     * @return <code>null</code> if the member is no way, the node otherwise.
+     */
     public static Node lastOnewayNode(RelationMember m) {
         if (!m.isWay()) return null;
-        if ("backward".equals(m.getRole())) {
+        if (ROLE_BACKWARD.equals(m.getRole())) {
             return m.getWay().firstNode();
         }
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/WayConnectionType.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/WayConnectionType.java	(revision 14029)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/WayConnectionType.java	(revision 14030)
@@ -78,6 +78,6 @@
 
     /**
-     * Returns tooltip.
-     * @return tooltip
+     * Returns the tooltip to display when hovering over the relation member.
+     * @return The tooltip, never null.
      * @since 10248
      */
Index: /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditorTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditorTest.java	(revision 14029)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditorTest.java	(revision 14030)
@@ -4,4 +4,5 @@
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
 
 import java.util.Collections;
@@ -94,4 +95,6 @@
     /**
      * Unit test of {@code GenericRelationEditor#build*} methods.
+     * <p>
+     * This test only tests if they do not throw exceptions.
      */
     @Test
@@ -111,4 +114,7 @@
         assertNotNull(top);
         assertNotNull(tagEditorPanel.getModel());
+        assertNotNull(tagModel);
+        assertSame(memberTableModel, memberTable.getModel());
+        assertSame(selectionTableModel, selectionTable.getModel());
     }
 }
