Index: trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java	(revision 6732)
+++ trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java	(revision 6733)
@@ -28,5 +28,4 @@
 import org.openstreetmap.josm.tools.Utils;
 import org.openstreetmap.josm.tools.template_engine.TemplateEngineDataProvider;
-
 
 /**
@@ -974,4 +973,5 @@
         }
     }
+
     /**
      * Find primitives that reference this primitive. Returns only primitives that are included in the same
@@ -988,7 +988,5 @@
      * @return a collection of all primitives that reference this primitive.
      */
-
     public final List<OsmPrimitive> getReferrers(boolean allowWithoutDataset) {
-        // Method copied from OsmPrimitive in josm-ng
         // Returns only referrers that are members of the same dataset (primitive can have some fake references, for example
         // when way is cloned
Index: trunk/src/org/openstreetmap/josm/gui/preferences/audio/AudioPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/audio/AudioPreference.java	(revision 6732)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/audio/AudioPreference.java	(revision 6733)
@@ -19,16 +19,7 @@
 import org.openstreetmap.josm.tools.GBC;
 
-/*
- * marker.audiosampleminsecs
- * marker.audiosampleminmetres
- * marker.buttonlabels
- * markers.namedtrackpoints
- * audio.forwardbackamount
- * audio.leadin
- * audio.menuinvisible
- * marker.audiotraceVisible
- * audio.toolbar ??
+/**
+ * Audio preferences.
  */
-
 public final class AudioPreference extends DefaultTabPreferenceSetting {
 
Index: trunk/src/org/openstreetmap/josm/gui/preferences/audio/package-info.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/audio/package-info.java	(revision 6733)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/audio/package-info.java	(revision 6733)
@@ -0,0 +1,6 @@
+// License: GPL. For details, see LICENSE file.
+
+/**
+ * Provides classes for handling audio preferences.
+ */
+package org.openstreetmap.josm.gui.preferences.audio;
Index: trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddTMSLayerPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddTMSLayerPanel.java	(revision 6732)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddTMSLayerPanel.java	(revision 6733)
@@ -4,5 +4,4 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
-import java.awt.Dimension;
 import java.awt.event.KeyAdapter;
 import java.awt.event.KeyEvent;
@@ -10,5 +9,4 @@
 
 import javax.swing.JLabel;
-import javax.swing.text.View;
 
 import org.openstreetmap.josm.data.imagery.ImageryInfo;
@@ -18,4 +16,7 @@
 import org.openstreetmap.josm.tools.Utils;
 
+/**
+ * An imagery panel used to add TMS imagery sources
+ */
 public class AddTMSLayerPanel extends AddImageryPanel {
 
@@ -80,14 +81,4 @@
     }
 
-    public static Dimension getPreferredSize(JLabel label, boolean width, int prefSize) {
-
-        View view = (View) label.getClientProperty(javax.swing.plaf.basic.BasicHTML.propertyKey);
-        view.setSize(width ? prefSize : 0, width ? 0 : prefSize);
-
-        return new java.awt.Dimension(
-                (int) Math.ceil(view.getPreferredSpan(View.X_AXIS)),
-                (int) Math.ceil(view.getPreferredSpan(View.Y_AXIS)));
-    }
-
     protected final String getTmsUrl() {
         return sanitize(tmsUrl.getText());
Index: trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddWMSLayerPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddWMSLayerPanel.java	(revision 6732)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddWMSLayerPanel.java	(revision 6733)
@@ -30,4 +30,7 @@
 import org.openstreetmap.josm.tools.Utils;
 
+/**
+ * An imagery panel used to add WMS imagery sources
+ */
 public class AddWMSLayerPanel extends AddImageryPanel {
 
Index: trunk/src/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreference.java	(revision 6732)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreference.java	(revision 6733)
@@ -67,4 +67,7 @@
 import org.openstreetmap.josm.tools.LanguageInfo;
 
+/**
+ * Imagery preferences, including imagery providers, settings and offsets.
+ */
 public final class ImageryPreference extends DefaultTabPreferenceSetting {
 
@@ -129,4 +132,8 @@
     }
 
+    /**
+     * Returns the imagery providers panel.
+     * @return The imagery providers panel.
+     */
     public ImageryProvidersPanel getProvidersPanel() {
         return imageryProviders;
@@ -189,17 +196,28 @@
     }
 
+    /**
+     * A panel displaying imagery providers.
+     */
     public static class ImageryProvidersPanel extends JPanel {
         // Public JTables and JMapViewer
+        /** The table of active providers **/
         public final JTable activeTable;
+        /** The table of default providers **/
         public final JTable defaultTable;
+        /** The map displaying imagery bounds of selected default providers **/
         public final JMapViewer defaultMap;
 
         // Public models
+        /** The model of active providers **/
         public final ImageryLayerTableModel activeModel;
+        /** The model of default providers **/
         public final ImageryDefaultLayerTableModel defaultModel;
 
         // Public JToolbars
+        /** The toolbar on the right of active providers **/
         public final JToolBar activeToolbar;
+        /** The toolbar on the middle of the panel **/
         public final JToolBar middleToolbar;
+        /** The toolbar on the right of default providers **/
         public final JToolBar defaultToolbar;
 
@@ -240,4 +258,9 @@
         }
 
+        /**
+         * Constructs a new {@code ImageryProvidersPanel}.
+         * @param gui The parent preference tab pane
+         * @param layerInfoArg The list of imagery entries to display
+         */
         public ImageryProvidersPanel(final PreferenceTabbedPane gui, ImageryLayerInfo layerInfoArg) {
             super(new GridBagLayout());
Index: trunk/src/org/openstreetmap/josm/gui/preferences/imagery/WMSLayerTree.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/imagery/WMSLayerTree.java	(revision 6732)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/imagery/WMSLayerTree.java	(revision 6733)
@@ -20,4 +20,7 @@
 import org.openstreetmap.josm.io.imagery.WMSImagery;
 
+/**
+ * The layer tree of a WMS server.
+ */
 public class WMSLayerTree {
     private final MutableTreeNode treeRootNode = new DefaultMutableTreeNode();
@@ -27,12 +30,24 @@
     private boolean previouslyShownUnsupportedCrsError = false;
 
+    /**
+     * Returns the root node.
+     * @return The root node
+     */
     public MutableTreeNode getTreeRootNode() {
         return treeRootNode;
     }
 
+    /**
+     * Returns the {@code JTree}.
+     * @return The {@code JTree}
+     */
     public JTree getLayerTree() {
         return layerTree;
     }
 
+    /**
+     * Returns the list of selected layers.
+     * @return the list of selected layers
+     */
     public List<WMSImagery.LayerDetails> getSelectedLayers() {
         return selectedLayers;
@@ -55,4 +70,8 @@
     }
 
+    /**
+     * Updates the whole tree with the given WMS imagery info.
+     * @param wms The imagery info for a given WMS server
+     */
     public void updateTree(WMSImagery wms) {
         treeRootNode.setUserObject(wms.getServiceUrl().getHost());
@@ -60,4 +79,8 @@
     }
 
+    /**
+     * Updates the list of WMS layers.
+     * @param layers The list of layers to add to the root node
+     */
     public void updateTreeList(List<WMSImagery.LayerDetails> layers) {
         addLayersToTreeData(getTreeRootNode(), layers);
Index: trunk/src/org/openstreetmap/josm/gui/preferences/imagery/package-info.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/imagery/package-info.java	(revision 6733)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/imagery/package-info.java	(revision 6733)
@@ -0,0 +1,6 @@
+// License: GPL. For details, see LICENSE file.
+
+/**
+ * Provides classes for handling imagery preferences.
+ */
+package org.openstreetmap.josm.gui.preferences.imagery;
Index: trunk/src/org/openstreetmap/josm/gui/preferences/map/BackupPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/map/BackupPreference.java	(revision 6732)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/map/BackupPreference.java	(revision 6733)
@@ -28,4 +28,7 @@
 import org.openstreetmap.josm.tools.GBC;
 
+/**
+ * Preference settings for data layer autosave.
+ */
 public class BackupPreference implements SubPreferenceSetting {
 
Index: trunk/src/org/openstreetmap/josm/gui/preferences/map/MapPaintPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/map/MapPaintPreference.java	(revision 6732)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/map/MapPaintPreference.java	(revision 6733)
@@ -17,6 +17,4 @@
 import javax.swing.JCheckBox;
 import javax.swing.JPanel;
-import javax.swing.event.ChangeEvent;
-import javax.swing.event.ChangeListener;
 
 import org.openstreetmap.josm.Main;
@@ -26,8 +24,8 @@
 import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane;
 import org.openstreetmap.josm.gui.preferences.SourceEditor;
-import org.openstreetmap.josm.gui.preferences.SourceType;
 import org.openstreetmap.josm.gui.preferences.SourceEditor.ExtendedSourceEntry;
 import org.openstreetmap.josm.gui.preferences.SourceEntry;
 import org.openstreetmap.josm.gui.preferences.SourceProvider;
+import org.openstreetmap.josm.gui.preferences.SourceType;
 import org.openstreetmap.josm.gui.preferences.SubPreferenceSetting;
 import org.openstreetmap.josm.gui.preferences.TabPreferenceSetting;
@@ -36,4 +34,7 @@
 import org.openstreetmap.josm.tools.Utils;
 
+/**
+ * Preference settings for map paint styles.
+ */
 public class MapPaintPreference implements SubPreferenceSetting {
     private SourceEditor sources;
Index: trunk/src/org/openstreetmap/josm/gui/preferences/map/MapPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/map/MapPreference.java	(revision 6732)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/map/MapPreference.java	(revision 6733)
@@ -12,4 +12,7 @@
 import org.openstreetmap.josm.tools.GBC;
 
+/**
+ * Map preferences, including map paint styles, tagging presets and autosave sub-preferences.
+ */
 public final class MapPreference extends DefaultTabPreferenceSetting {
 
Index: trunk/src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java	(revision 6732)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java	(revision 6733)
@@ -22,6 +22,4 @@
 import javax.swing.JPanel;
 import javax.swing.JSeparator;
-import javax.swing.event.ChangeEvent;
-import javax.swing.event.ChangeListener;
 
 import org.openstreetmap.josm.Main;
@@ -47,4 +45,7 @@
 import org.xml.sax.SAXParseException;
 
+/**
+ * Preference settings for tagging presets.
+ */
 public final class TaggingPresetPreference implements SubPreferenceSetting {
 
@@ -64,4 +65,8 @@
 
     private static final List<SourceProvider> presetSourceProviders = new ArrayList<SourceProvider>();
+    
+    /**
+     * The collection of tagging presets.
+     */
     public static Collection<TaggingPreset> taggingPresets;
     private SourceEditor sources;
Index: trunk/src/org/openstreetmap/josm/gui/preferences/map/package-info.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/map/package-info.java	(revision 6733)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/map/package-info.java	(revision 6733)
@@ -0,0 +1,6 @@
+// License: GPL. For details, see LICENSE file.
+
+/**
+ * Provides classes for handling map preferences.
+ */
+package org.openstreetmap.josm.gui.preferences.map;
Index: trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginListPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginListPanel.java	(revision 6732)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginListPanel.java	(revision 6733)
@@ -32,11 +32,21 @@
 import org.openstreetmap.josm.tools.Utils;
 
-public class PluginListPanel extends VerticallyScrollablePanel{
+/**
+ * A panel displaying the list of known plugins.
+ */
+public class PluginListPanel extends VerticallyScrollablePanel {
     private PluginPreferencesModel model;
 
+    /**
+     * Constructs a new {@code PluginListPanel} with a default model.
+     */
     public PluginListPanel() {
         this(new PluginPreferencesModel());
     }
 
+    /**
+     * Constructs a new {@code PluginListPanel} with a given model.
+     * @param model The plugin model
+     */
     public PluginListPanel(PluginPreferencesModel model) {
         this.model = model;
@@ -72,4 +82,7 @@
     }
 
+    /**
+     * Displays a message when the plugin list is empty.
+     */
     public void displayEmptyPluginListInformation() {
         GridBagConstraints gbc = new GridBagConstraints();
@@ -181,4 +194,7 @@
     }
 
+    /**
+     * Refreshes the list.
+     */
     public void refreshView() {
         final Rectangle visibleRect = getVisibleRect();
Index: trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferencesModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferencesModel.java	(revision 6732)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferencesModel.java	(revision 6733)
@@ -21,5 +21,8 @@
 import org.openstreetmap.josm.plugins.PluginInformation;
 
-public class PluginPreferencesModel extends Observable{
+/**
+ * The plugin model behind a {@code PluginListPanel}.
+ */
+public class PluginPreferencesModel extends Observable {
     private final List<PluginInformation> availablePlugins = new ArrayList<PluginInformation>();
     private final List<PluginInformation> displayedPlugins = new ArrayList<PluginInformation>();
@@ -37,4 +40,8 @@
     }
 
+    /**
+     * Filters the list of displayed plugins.
+     * @param filter The filter used against plugin name, description or version
+     */
     public void filterDisplayedPlugins(String filter) {
         if (filter == null) {
@@ -55,4 +62,8 @@
     }
 
+    /**
+     * Sets the list of available plugins.
+     * @param available The available plugins
+     */
     public void setAvailablePlugins(Collection<PluginInformation> available) {
         availablePlugins.clear();
Index: trunk/src/org/openstreetmap/josm/gui/preferences/projection/AbstractProjectionChoice.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/projection/AbstractProjectionChoice.java	(revision 6732)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/projection/AbstractProjectionChoice.java	(revision 6733)
@@ -13,5 +13,5 @@
 
     /**
-     * Constructor.
+     * Constructs a new {@code AbstractProjectionChoice}.
      *
      * @param name short name of the projection choice as shown in the GUI
@@ -26,8 +26,10 @@
 
     /**
-     * Constructor (without cacheDir argument).
+     * Constructs a new {@code AbstractProjectionChoice}.
      *
      * Only for core projection choices, where chacheDir is the same as
      * the second part of the id.
+     * @param name short name of the projection choice as shown in the GUI
+     * @param id unique identifier for the projection choice
      */
     public AbstractProjectionChoice(String name, String id) {
@@ -63,4 +65,3 @@
         return new CustomProjection(getProjectionName(), code, pref, getCacheDir());
     }
-
 }
Index: trunk/src/org/openstreetmap/josm/gui/preferences/projection/ProjectionChoice.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/projection/ProjectionChoice.java	(revision 6732)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/projection/ProjectionChoice.java	(revision 6733)
@@ -38,4 +38,5 @@
     /**
      * Get the projection that matches the internal state.
+     * @return the effective projection
      */
     Projection getProjection();
@@ -62,4 +63,5 @@
     /**
      * Return all projection codes supported by this projection choice.
+     * @return all supported projection codes 
      */
     String[] allCodes();
@@ -67,4 +69,5 @@
     /**
      * Get Preferences from projection code.
+     * @param code projection code
      *
      * @return null when code is not part of this projection choice.
@@ -80,4 +83,3 @@
      */
     String toString();
-
 }
Index: trunk/src/org/openstreetmap/josm/gui/preferences/projection/SingleProjectionChoice.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/projection/SingleProjectionChoice.java	(revision 6732)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/projection/SingleProjectionChoice.java	(revision 6733)
@@ -18,5 +18,5 @@
 
     /**
-     * Constructor.
+     * Constructs a new {@code SingleProjectionChoice}.
      *
      * @param name short name of the projection choice as shown in the GUI
@@ -30,4 +30,11 @@
     }
 
+    /**
+     * Constructs a new {@code SingleProjectionChoice}.
+     *
+     * @param name short name of the projection choice as shown in the GUI
+     * @param id unique identifier for the projection choice, e.g. "core:thisproj"
+     * @param code the unique identifier for the projection, e.g. "EPSG:1234"
+     */
     public SingleProjectionChoice(String name, String id, String code) {
         super(name, id);
@@ -55,9 +62,4 @@
 
     @Override
-    public String toString() {
-        return name;
-    }
-
-    @Override
     public Collection<String> getPreferencesFromCode(String code) {
         if (code.equals(this.code))
