Index: /applications/editors/josm/plugins/osmarender/build.xml
===================================================================
--- /applications/editors/josm/plugins/osmarender/build.xml	(revision 27856)
+++ /applications/editors/josm/plugins/osmarender/build.xml	(revision 27857)
@@ -34,5 +34,5 @@
     <property name="xslt" location="./xslt"/>
     <property name="commit.message" value="Fixed #4360 - osmarender plugin does not load"/>
-    <property name="plugin.main.version" value="4645"/>
+    <property name="plugin.main.version" value="4968"/>
     <target name="init">
         <mkdir dir="${plugin.build.dir}"/>
Index: /applications/editors/josm/plugins/osmarender/src/org/openstreetmap/josm/plugins/osmarender/OsmarenderPlugin.java
===================================================================
--- /applications/editors/josm/plugins/osmarender/src/org/openstreetmap/josm/plugins/osmarender/OsmarenderPlugin.java	(revision 27856)
+++ /applications/editors/josm/plugins/osmarender/src/org/openstreetmap/josm/plugins/osmarender/OsmarenderPlugin.java	(revision 27857)
@@ -34,4 +34,6 @@
 import org.openstreetmap.josm.gui.preferences.PreferenceSetting;
 import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane;
+import org.openstreetmap.josm.gui.preferences.SubPreferenceSetting;
+import org.openstreetmap.josm.gui.preferences.TabPreferenceSetting;
 import org.openstreetmap.josm.io.OsmWriter;
 import org.openstreetmap.josm.io.OsmWriterFactory;
@@ -142,21 +144,39 @@
 
     @Override public PreferenceSetting getPreferenceSetting() {
-        return new PreferenceSetting(){
-            private JTextField firefox = new JTextField(10);
-            public void addGui(PreferenceTabbedPane gui) {
-                final JPanel panel = new JPanel(new GridBagLayout());
-                panel.setBorder(BorderFactory.createEmptyBorder( 0, 0, 0, 0 ));
-
-                panel.add(new JLabel(tr("Firefox executable")), GBC.std().insets(10,5,5,0));
-                panel.add(firefox, GBC.eol().insets(0,5,0,0).fill(GBC.HORIZONTAL));
-                panel.add(Box.createVerticalGlue(), GBC.eol().fill(GBC.BOTH));
-                firefox.setText(Main.pref.get("osmarender.firefox"));
-                gui.mapcontent.addTab(tr("Osmarender"), panel);
-            }
-            public boolean ok() {
-                Main.pref.put("osmarender.firefox", firefox.getText());
-                return false;
-            }
-        };
+        return new OsmarenderPreferenceSetting();
+    }
+
+    private class OsmarenderPreferenceSetting implements SubPreferenceSetting {
+
+        private JTextField firefox = new JTextField(10);
+
+        @Override
+        public void addGui(PreferenceTabbedPane gui) {
+            final JPanel panel = new JPanel(new GridBagLayout());
+            panel.setBorder(BorderFactory.createEmptyBorder( 0, 0, 0, 0 ));
+
+            panel.add(new JLabel(tr("Firefox executable")), GBC.std().insets(10,5,5,0));
+            panel.add(firefox, GBC.eol().insets(0,5,0,0).fill(GBC.HORIZONTAL));
+            panel.add(Box.createVerticalGlue(), GBC.eol().fill(GBC.BOTH));
+            firefox.setText(Main.pref.get("osmarender.firefox"));
+            gui.getMapPreference().mapcontent.addTab(tr("Osmarender"), panel);
+        }
+
+        @Override
+        public boolean ok() {
+            Main.pref.put("osmarender.firefox", firefox.getText());
+            return false;
+        }
+
+        @Override
+        public boolean isExpert() {
+            return false;
+        }
+
+        @Override
+        public TabPreferenceSetting getTabPreferenceSetting(final PreferenceTabbedPane gui) {
+            return gui.getMapPreference();
+        }
+
     }
 
Index: /applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/gui/RoutingPreferenceDialog.java
===================================================================
--- /applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/gui/RoutingPreferenceDialog.java	(revision 27856)
+++ /applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/gui/RoutingPreferenceDialog.java	(revision 27857)
@@ -55,5 +55,5 @@
 import org.apache.log4j.Logger;
 import org.openstreetmap.josm.Main;
-import org.openstreetmap.josm.gui.preferences.PreferenceSetting;
+import org.openstreetmap.josm.gui.preferences.DefaultTabPreferenceSetting;
 import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane;
 import org.openstreetmap.josm.tools.GBC;
@@ -61,5 +61,5 @@
 import com.innovant.josm.jrt.osm.OsmWayTypes;
 
-public class RoutingPreferenceDialog implements PreferenceSetting {
+public class RoutingPreferenceDialog extends DefaultTabPreferenceSetting {
 
     /**
@@ -75,5 +75,5 @@
      */
     public RoutingPreferenceDialog() {
-        super();
+        super("routing", tr("Routing Plugin Preferences"), tr("Configure routing preferences."));
         readPreferences();
     }
@@ -81,6 +81,5 @@
     public void addGui(final PreferenceTabbedPane gui) {
 
-        JPanel principal = gui.createPreferenceTab("routing",
-                tr("Routing Plugin Preferences"), tr("Configure routing preferences."));
+        JPanel principal = gui.createPreferenceTab(this);
 
         JPanel p = new JPanel();
Index: /applications/editors/josm/plugins/simplifyarea/src/sk/zdila/josm/plugin/simplify/SimplifyAreaPreferenceSetting.java
===================================================================
--- /applications/editors/josm/plugins/simplifyarea/src/sk/zdila/josm/plugin/simplify/SimplifyAreaPreferenceSetting.java	(revision 27856)
+++ /applications/editors/josm/plugins/simplifyarea/src/sk/zdila/josm/plugin/simplify/SimplifyAreaPreferenceSetting.java	(revision 27857)
@@ -9,9 +9,9 @@
 
 import org.openstreetmap.josm.Main;
-import org.openstreetmap.josm.gui.preferences.PreferenceSetting;
+import org.openstreetmap.josm.gui.preferences.DefaultTabPreferenceSetting;
 import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane;
 import org.openstreetmap.josm.tools.GBC;
 
-public class SimplifyAreaPreferenceSetting implements PreferenceSetting {
+public class SimplifyAreaPreferenceSetting extends DefaultTabPreferenceSetting {
 
     static final String DIST_FACTOR = "simplify-area.dist.factor";
@@ -31,16 +31,19 @@
     private final JTextField distanceFactor = new JTextField(8);
 
+    public SimplifyAreaPreferenceSetting() {
+        super("simplifyArea", "Simplify Area", "Node of the way (area) is removed if all of <u>Angle Weight</u>, <u>Area Weight</u> and <u>Distance Weight</u> are greater than 1. " +
+                "<u>Weight</u> is computed as <u>Value</u> / <u>Threshold</u>, where <u>Value</u> is one of <u>Angle</u>, <u>Area</u> and <u>Distance</u> " +
+                "computed from every three adjanced points of the way." +
+                "<ul><li><u>Value</u> of <u>Angle</u> is angle in degrees on the second node</li>" +
+                "<li><u>Value</u> of <u>Area</u> is area formed by triangle</li>" +
+                "<li><u>Value</u> of the <u>Distance</u> is Cross Track Error Distance</li></ul>" +
+                "All three <u>Weight</u>s multiplied by its <u>Factor</u>s are summed and node of the lowest sum is removed first. " +
+                "Removal continues until there is no node to remove." +
+                "Merge Nearby Nodes is another step of the simplification that merges adjanced nodes that are closer than <u>Threshold</u> meters.");
+    }
 
     @Override
     public void addGui(final PreferenceTabbedPane gui) {
-        final JPanel tab = gui.createPreferenceTab("simplifyArea", "Simplify Area", "Node of the way (area) is removed if all of <u>Angle Weight</u>, <u>Area Weight</u> and <u>Distance Weight</u> are greater than 1. " +
-        		"<u>Weight</u> is computed as <u>Value</u> / <u>Threshold</u>, where <u>Value</u> is one of <u>Angle</u>, <u>Area</u> and <u>Distance</u> " +
-        		"computed from every three adjanced points of the way." +
-        		"<ul><li><u>Value</u> of <u>Angle</u> is angle in degrees on the second node</li>" +
-        		"<li><u>Value</u> of <u>Area</u> is area formed by triangle</li>" +
-        		"<li><u>Value</u> of the <u>Distance</u> is Cross Track Error Distance</li></ul>" +
-        		"All three <u>Weight</u>s multiplied by its <u>Factor</u>s are summed and node of the lowest sum is removed first. " +
-        		"Removal continues until there is no node to remove." +
-        		"Merge Nearby Nodes is another step of the simplification that merges adjanced nodes that are closer than <u>Threshold</u> meters.");
+        final JPanel tab = gui.createPreferenceTab(this);
 
         angleThreshold.setText(Main.pref.get(ANGLE_THRESHOLD, "10"));
Index: /applications/editors/josm/plugins/tag2link/build.xml
===================================================================
--- /applications/editors/josm/plugins/tag2link/build.xml	(revision 27856)
+++ /applications/editors/josm/plugins/tag2link/build.xml	(revision 27857)
@@ -32,5 +32,5 @@
     <property name="commit.message" value="Commit message"/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="4549"/>
+    <property name="plugin.main.version" value="4968"/>
     <!-- should not be necessary to change the following properties -->
     <property name="josm" location="../../core/dist/josm-custom.jar"/>
@@ -149,8 +149,8 @@
     </target>
     <!--
-    ************************** Publishing the plugin *********************************** 
-    -->
-    <!--
-    ** extracts the JOSM release for the JOSM version in ../core and saves it in the 
+    ************************** Publishing the plugin ***********************************
+    -->
+    <!--
+    ** extracts the JOSM release for the JOSM version in ../core and saves it in the
     ** property ${coreversion.info.entry.revision}
     -->
@@ -196,10 +196,10 @@
         <echo>
     ***** Properties of published ${plugin.jar} *****
-    Commit message    : '${commit.message}'                    
+    Commit message    : '${commit.message}'
     Plugin-Mainversion: ${plugin.main.version}
     JOSM build version: ${coreversion.info.entry.revision}
     Plugin-Version    : ${version.entry.commit.revision}
-    ***** / Properties of published ${plugin.jar} *****                    
-                        
+    ***** / Properties of published ${plugin.jar} *****
+
     Now commiting ${plugin.jar} ...
     </echo>
Index: /applications/editors/josm/plugins/tag2link/src/org/openstreetmap/josm/plugins/tag2link/Tag2LinkPlugin.java
===================================================================
--- /applications/editors/josm/plugins/tag2link/src/org/openstreetmap/josm/plugins/tag2link/Tag2LinkPlugin.java	(revision 27856)
+++ /applications/editors/josm/plugins/tag2link/src/org/openstreetmap/josm/plugins/tag2link/Tag2LinkPlugin.java	(revision 27857)
@@ -42,6 +42,6 @@
 public class Tag2LinkPlugin extends Plugin {
 
-    private Tag2LinkPreferenceSetting preferenceSetting;
-    
+    // private Tag2LinkPreferenceSetting preferenceSetting; TODO
+
 	/**
 	 * Initializes the plugin.
@@ -50,5 +50,5 @@
 	public Tag2LinkPlugin(PluginInformation info) {
 		super(info);
-		this.preferenceSetting = new Tag2LinkPreferenceSetting();
+		// this.preferenceSetting = new Tag2LinkPreferenceSetting();
 		Tag2LinkRuleChecker.init();
 	}
@@ -57,9 +57,9 @@
      * @see org.openstreetmap.josm.plugins.Plugin#getPreferenceSetting()
      */
-    @Override
-    public PreferenceSetting getPreferenceSetting() {
-        return this.preferenceSetting;
-    }
-    
+//    @Override
+//    public PreferenceSetting getPreferenceSetting() {
+//        return this.preferenceSetting;
+//    }
+
     /* (non-Javadoc)
      * @see org.openstreetmap.josm.plugins.Plugin#mapFrameInitialized(org.openstreetmap.josm.gui.MapFrame, org.openstreetmap.josm.gui.MapFrame)
@@ -68,5 +68,5 @@
     public void mapFrameInitialized(MapFrame oldFrame, MapFrame newFrame) {
         if (newFrame != null) {
-            // Initialize dialogs listeners only after the main frame is created 
+            // Initialize dialogs listeners only after the main frame is created
             newFrame.selectionListDialog.addPopupMenuListener(new SelectionPopupListener(newFrame));
             newFrame.propertiesDialog.addMembershipPopupMenuListener(new MembershipPopupListener(newFrame));
Index: /applications/editors/josm/plugins/tag2link/src/org/openstreetmap/josm/plugins/tag2link/Tag2LinkPreferenceSetting.java
===================================================================
--- /applications/editors/josm/plugins/tag2link/src/org/openstreetmap/josm/plugins/tag2link/Tag2LinkPreferenceSetting.java	(revision 27856)
+++ /applications/editors/josm/plugins/tag2link/src/org/openstreetmap/josm/plugins/tag2link/Tag2LinkPreferenceSetting.java	(revision 27857)
@@ -16,8 +16,14 @@
 package org.openstreetmap.josm.plugins.tag2link;
 
-import org.openstreetmap.josm.gui.preferences.PreferenceSetting;
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+import org.openstreetmap.josm.gui.preferences.DefaultTabPreferenceSetting;
 import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane;
 
-public class Tag2LinkPreferenceSetting implements PreferenceSetting, Tag2LinkConstants {
+public class Tag2LinkPreferenceSetting extends DefaultTabPreferenceSetting implements Tag2LinkConstants {
+
+    public Tag2LinkPreferenceSetting() {
+        super(ICON_48, tr("Tag2Link Preferences"), tr("Tag2Link Preferences"));
+    }
 
     @Override
Index: /applications/editors/josm/plugins/turnrestrictions/build.xml
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/build.xml	(revision 27856)
+++ /applications/editors/josm/plugins/turnrestrictions/build.xml	(revision 27857)
@@ -32,5 +32,5 @@
     <property name="commit.message" value="Adapt to JOSM core change (DefaultNameFormatter)"/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="4549"/>
+    <property name="plugin.main.version" value="4968"/>
     <!--
       ************************************************
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 27856)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/preferences/PreferenceEditor.java	(revision 27857)
@@ -19,5 +19,5 @@
 
 import org.openstreetmap.josm.Main;
-import org.openstreetmap.josm.gui.preferences.PreferenceSetting;
+import org.openstreetmap.josm.gui.preferences.DefaultTabPreferenceSetting;
 import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane;
 import org.openstreetmap.josm.gui.widgets.HtmlPanel;
@@ -30,11 +30,17 @@
  *
  */
-public class PreferenceEditor extends JPanel implements PreferenceSetting{
-    
+public class PreferenceEditor extends DefaultTabPreferenceSetting {
+
     private PreferencesPanel pnlIconPreferences;
+    private JPanel mainPanel;
+
+    public PreferenceEditor() {
+        super("turnrestrictions", tr("Turn Restrictions"), tr("An OSM plugin for editing turn restrictions."));
+        build();
+    }
 
     /**
-     * builds the panel with the sponsoring information 
-     * 
+     * builds the panel with the sponsoring information
+     *
      * @return
      */
@@ -50,15 +56,15 @@
         pnl.add(lbl, gc);
         lbl.setIcon(ImageProvider.get("skobbler-logo"));
-        
+
         gc.gridx = 1;
         gc.weightx = 1.0;
         HtmlPanel msg  =new HtmlPanel();
         msg.setText("<html><body>"
-                + tr("Development of the turn restriction plugin was sponsored " 
+                + tr("Development of the turn restriction plugin was sponsored "
                 + "by <a href=\"http://www.skobbler.de\">skobbler GmbH</a>.")
                 +"</body></html>");
         pnl.add(msg, gc);
-        
-        // filler - grab remaining space 
+
+        // filler - grab remaining space
         gc.gridy = 1;
         gc.gridx = 0;
@@ -67,5 +73,5 @@
         gc.weighty = 1.0;
         pnl.add(new JPanel(), gc);
-        
+
         SkobblerUrlLauncher urlLauncher = new SkobblerUrlLauncher();
         msg.getEditorPane().addHyperlinkListener(urlLauncher);
@@ -76,35 +82,31 @@
     protected JPanel buildIconPreferencePanel() {
         JPanel pnl = new JPanel(new BorderLayout());
-        
+
         pnlIconPreferences = new PreferencesPanel();
         pnlIconPreferences.initFromPreferences(Main.pref);
-        
+
         JScrollPane sp = new JScrollPane(pnlIconPreferences);
         sp.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
         sp.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
-        
+
         pnl.add(sp, BorderLayout.CENTER);
         return pnl;
     }
-    
+
     protected void build() {
-        setLayout(new BorderLayout());
+        mainPanel = new JPanel();
+        mainPanel.setLayout(new BorderLayout());
         JTabbedPane tp = new JTabbedPane();
         tp.add(buildIconPreferencePanel());
-        tp.add(buildCreditPanel());     
+        tp.add(buildCreditPanel());
         tp.setTitleAt(0, tr("Preferences"));
         tp.setToolTipTextAt(0,tr("Configure the preferences for the turnrestrictions plugin"));
         tp.setTitleAt(1, tr("Sponsor"));
-        add(tp, BorderLayout.CENTER);
+        mainPanel.add(tp, BorderLayout.CENTER);
     }
-    
-    public PreferenceEditor() {
-        build();
-    }
-    
+
     public void addGui(PreferenceTabbedPane gui) {
-        String description = tr("An OSM plugin for editing turn restrictions.");
-        JPanel tab = gui.createPreferenceTab("turnrestrictions", tr("Turn Restrictions"), description);
-        tab.add(this, GBC.eol().fill(GBC.BOTH));
+        JPanel tab = gui.createPreferenceTab(this);
+        tab.add(mainPanel, GBC.eol().fill(GBC.BOTH));
     }
 
@@ -113,7 +115,7 @@
         return false;
     }
-    
+
     /**
-     * Launches an external browser with the sponsors home page 
+     * Launches an external browser with the sponsors home page
      */
     class SkobblerUrlLauncher extends MouseAdapter implements HyperlinkListener {
@@ -121,5 +123,5 @@
             OpenBrowser.displayUrl("http://www.skobbler.de");
         }
-        
+
         public void hyperlinkUpdate(HyperlinkEvent e) {
             if (e.getEventType().equals(HyperlinkEvent.EventType.ACTIVATED)) {
Index: /applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/customurl/UtilsPluginPreferences.java
===================================================================
--- /applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/customurl/UtilsPluginPreferences.java	(revision 27856)
+++ /applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/customurl/UtilsPluginPreferences.java	(revision 27857)
@@ -1,6 +1,3 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
+// License: GPL. For details, see LICENSE file.
 package utilsplugin2.customurl;
 
@@ -22,5 +19,5 @@
 import javax.swing.event.TableModelListener;
 import javax.swing.table.DefaultTableModel;
-import org.openstreetmap.josm.gui.preferences.PreferenceSetting;
+import org.openstreetmap.josm.gui.preferences.DefaultTabPreferenceSetting;
 import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane;
 import org.openstreetmap.josm.tools.GBC;
@@ -28,5 +25,5 @@
 import static org.openstreetmap.josm.tools.I18n.*;
 
-public class UtilsPluginPreferences  implements PreferenceSetting {
+public class UtilsPluginPreferences extends DefaultTabPreferenceSetting {
     HistoryComboBox combo1=new HistoryComboBox();
     JTable table;
@@ -35,20 +32,22 @@
     JButton saveButton;
 
+    public UtilsPluginPreferences() {
+        super("utils", tr("Utilsplugin2 settings [TESTING]"), tr("Here you can change some preferences of Utilsplugin2 functions"));
+    }
+
     @Override
     public void addGui(PreferenceTabbedPane gui) {
-        JPanel pp = gui.createPreferenceTab("utils", tr("Utilsplugin2 settings [TESTING]"),
-                tr("Here you can change some preferences of Utilsplugin2 functions"));
+        JPanel pp = gui.createPreferenceTab(this);
         JPanel all = new JPanel();
         GridBagLayout layout = new GridBagLayout();
         all.setLayout(layout);
-        
+
         // FIXME: get rid of hardcoded URLS
-        
+
         String addr =  URLList.getSelectedURL();
         table=new JTable(new DefaultTableModel(null,new String[]{"Title","URL"}));
-        
+
         List<String> items = URLList.getURLList();
-        //System.out.println("pref:"+addr);
-        
+
         resetButton = new JButton(tr("Reset"));
         resetButton.addActionListener(new ActionListener() {
@@ -57,5 +56,5 @@
             }
         });
-        
+
         saveButton = new JButton(tr("Save to file"));
         saveButton.addActionListener(new ActionListener() {
@@ -64,5 +63,5 @@
             }
         });
-        
+
         loadButton = new JButton(tr("Load from file"));
         loadButton.addActionListener(new ActionListener() {
@@ -71,7 +70,7 @@
             }
         });
-        
+
         fillRows(items);
-        
+
         HtmlPanel help = new HtmlPanel(tr("Please edit custom URLs and select one row to use with the tool<br/>"
                 + " <b>&#123;key&#125;</b> is replaced with the tag value<br/>"
@@ -80,5 +79,5 @@
                 + " <b>&#123;#lat&#125; , &#123;#lon&#125;</b> is replaced with map center latitude/longitude <br/>"
                 + " Your can manually load settings from file <b>customurl.txt</b> in JOSM folder"));
-        
+
         all.add(new JLabel(tr("Custom URL configuration")),GBC.std().insets(5,10,0,0));
         all.add(resetButton,GBC.std().insets(25,10,0,0));
@@ -86,5 +85,5 @@
         all.add(saveButton,GBC.eol().insets(25,10,0,0));
         all.add(help,GBC.eop().insets(5,10,0,0));
-        
+
         table.getColumnModel().getColumn(0).setPreferredWidth(150);
         table.getColumnModel().getColumn(0).setMaxWidth(300);
@@ -99,10 +98,10 @@
                 if (row<0  || column<0) return;
                 String data = (String)model.getValueAt(row, column);
-                if (data!=null && data.length()>0 && row==model.getRowCount()-1) 
+                if (data!=null && data.length()>0 && row==model.getRowCount()-1)
                     model.addRow(new String[]{"",""});
             }
         });
         all.add(table,GBC.eop().fill());
-        
+
         pp.add(all, GBC.eol().fill(GridBagConstraints.BOTH));
     }
@@ -135,10 +134,7 @@
         List<String> lst = readItemsFromTable();
         URLList.updateURLList(lst);
-       
+
         return false;
     }
-
-    
-   
 
     private List<String> readItemsFromTable() {
