Index: applications/editors/josm/plugins/OpeningHoursEditor/.checkstyle
===================================================================
--- applications/editors/josm/plugins/OpeningHoursEditor/.checkstyle	(revision 32583)
+++ applications/editors/josm/plugins/OpeningHoursEditor/.checkstyle	(revision 32583)
@@ -0,0 +1,19 @@
+<?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="src/org/openstreetmap/josm/plugins/ohe/parser"/>
+    <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/OpeningHoursEditor/.project
===================================================================
--- applications/editors/josm/plugins/OpeningHoursEditor/.project	(revision 32582)
+++ applications/editors/josm/plugins/OpeningHoursEditor/.project	(revision 32583)
@@ -21,8 +21,14 @@
 			</arguments>
 		</buildCommand>
+		<buildCommand>
+			<name>net.sf.eclipsecs.core.CheckstyleBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
 	</buildSpec>
 	<natures>
 		<nature>org.eclipse.jdt.core.javanature</nature>
 		<nature>sf.eclipse.javacc.javaccnature</nature>
+		<nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
 	</natures>
 </projectDescription>
Index: applications/editors/josm/plugins/OpeningHoursEditor/build.xml
===================================================================
--- applications/editors/josm/plugins/OpeningHoursEditor/build.xml	(revision 32582)
+++ applications/editors/josm/plugins/OpeningHoursEditor/build.xml	(revision 32583)
@@ -4,5 +4,5 @@
     <property name="commit.message" value="fixed main version"/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="10353"/>
+    <property name="plugin.main.version" value="10420"/>
 	
     <property name="plugin.author" value="Falko Thomale"/>
Index: applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/ClockSystem.java
===================================================================
--- applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/ClockSystem.java	(revision 32582)
+++ applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/ClockSystem.java	(revision 32583)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.ohe;
 
@@ -4,4 +5,6 @@
 import java.text.ParseException;
 import java.util.Locale;
+
+import org.openstreetmap.josm.Main;
 
 /**
@@ -27,4 +30,5 @@
             midnight = localeFormat.format(stdFormat.parse("12:00 AM"));
         } catch (ParseException ignore) {
+            Main.trace(ignore);
         }
         if (midnight.contains("12"))
Index: applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/OhePlugin.java
===================================================================
--- applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/OhePlugin.java	(revision 32582)
+++ applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/OhePlugin.java	(revision 32583)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.ohe;
 
@@ -59,13 +60,13 @@
      */
     private final String[][] TAG_EDIT_STRINGS = new String[][] {
-            { "opening_hours", ".*", "opening_hours" },
-            { "collection_times", ".*", "collection_times" },
-            { "collection_times:local", ".*", "collection_times:local" },
-            { "shop", ".*", "opening_hours" },
-            { "amenity", "post_box", "collection_times" },
-            { "amenity", "recycling", "collection_times" },
-            { "amenity", ".*", "opening_hours" },
-            { "lit", ".*", "lit" },
-            { "highway", ".*", "lit" } };
+            {"opening_hours", ".*", "opening_hours"},
+            {"collection_times", ".*", "collection_times"},
+            {"collection_times:local", ".*", "collection_times:local"},
+            {"shop", ".*", "opening_hours"},
+            {"amenity", "post_box", "collection_times"},
+            {"amenity", "recycling", "collection_times"},
+            {"amenity", ".*", "opening_hours"},
+            {"lit", ".*", "lit"},
+            {"highway", ".*", "lit"} };
 
     /**
@@ -86,5 +87,5 @@
         private static final long serialVersionUID = 1456257438391417756L;
 
-        public OheMenuAction() {
+        OheMenuAction() {
             super(tr("Edit opening hours"), "opening_hours.png",
                     tr("Edit time-tag of selected element in a graphical interface"), Shortcut.registerShortcut(
@@ -149,5 +150,5 @@
                 }
             };
-            propertyData.setColumnIdentifiers(new String[] { tr("Key"), tr("Value") });
+            propertyData.setColumnIdentifiers(new String[] {tr("Key"), tr("Value")});
             for (Entry<String, Map<String, Integer>> e : valueCount.entrySet()) {
                 int count = 0;
@@ -158,5 +159,5 @@
                     e.getValue().put("", selection.size() - count);
                 }
-                propertyData.addRow(new Object[] { e.getKey(), e.getValue() });
+                propertyData.addRow(new Object[] {e.getKey(), e.getValue()});
             }
             final JTable propertyTable = new JTable(propertyData);
@@ -229,9 +230,10 @@
                             break searchLoop;
                         } else if (value instanceof Map<?, ?>) {
-                            for (String v : ((Map<String, Integer>) value).keySet())
+                            for (String v : ((Map<String, Integer>) value).keySet()) {
                                 if (valuePattern.matcher(v).matches()) {
                                     preSelectedKey = pattern[2];
                                     break searchLoop;
                                 }
+                            }
                         }
                     }
@@ -239,8 +241,9 @@
             }
             int preSelectedRow = -1;
-            for (int i = 0; i < propertyData.getRowCount(); ++i)
+            for (int i = 0; i < propertyData.getRowCount(); ++i) {
                 if (preSelectedKey.equals(propertyData.getValueAt(i, 0))) {
                     preSelectedRow = i;
                 }
+            }
             if (preSelectedRow != -1) {
                 propertyTable.setEnabled(true);
@@ -304,5 +307,6 @@
             String[] changedKeyValuePair = null;
             answer = optionPane.getValue();
-            if (!(answer == null || answer == JOptionPane.UNINITIALIZED_VALUE || (answer instanceof Integer && (Integer) answer != JOptionPane.OK_OPTION))) {
+            if (!(answer == null || answer == JOptionPane.UNINITIALIZED_VALUE 
+              || (answer instanceof Integer && (Integer) answer != JOptionPane.OK_OPTION))) {
                 changedKeyValuePair = panel.getChangedKeyValuePair();
             }
Index: applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/OpeningTimeUtils.java
===================================================================
--- applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/OpeningTimeUtils.java	(revision 32582)
+++ applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/OpeningTimeUtils.java	(revision 32583)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.ohe;
 
@@ -9,5 +10,9 @@
  * Collection of utility methods.
  */
-public class OpeningTimeUtils {
+public final class OpeningTimeUtils {
+    
+    private OpeningTimeUtils() {
+        // Hide default constructors for utilities classes
+    }
     
     /**
@@ -53,5 +58,5 @@
                     for (DaytimeSpan timespan : dateTime2.daytimeSpans) {
                         if (!timespan.isOff()) {
-                            ret.add(new int[] { dayspan.startDay, dayspan.endDay, timespan.startMinute,
+                            ret.add(new int[] {dayspan.startDay, dayspan.endDay, timespan.startMinute,
                                     timespan.endMinute });
                         }
@@ -245,7 +250,8 @@
 
     private static boolean isArrayEmpty(boolean[] bs) {
-        for (int i = 0; i < bs.length; i++)
+        for (int i = 0; i < bs.length; i++) {
             if (bs[i])
                 return false;
+        }
         return true;
     }
@@ -265,5 +271,5 @@
      * @throws IllegalArgumentException if the day is invalid
      */
-    public static final void ensureValidDay(int day, String paramName) throws IllegalArgumentException {
+    public static void ensureValidDay(int day, String paramName) throws IllegalArgumentException {
         if (day < 0 || day > 6) {
             throw new IllegalArgumentException(paramName + " is not a valid day (0-6). Given value is " + day);
@@ -277,5 +283,5 @@
      * @throws IllegalArgumentException if the minute is invalid
      */
-    public static final void ensureValidMinute(int minute, String paramName) throws IllegalArgumentException {
+    public static void ensureValidMinute(int minute, String paramName) throws IllegalArgumentException {
         if (minute < 0 || minute > 24*60+1) {
             throw new IllegalArgumentException(paramName + " is not a valid minute (0-1441). Given value is " + minute);
Index: applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/gui/OheDialogPanel.java
===================================================================
--- applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/gui/OheDialogPanel.java	(revision 32582)
+++ applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/gui/OheDialogPanel.java	(revision 32583)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.ohe.gui;
 
@@ -47,8 +48,6 @@
      * The Panel for editing the time-values.
      * 
-     * @param plugin
-     * @param key
      * @param valuesToEdit
-     *            can be a String or a Map<String, Integer> which contains
+     *            can be a String or a Map&lt;String, Integer&gt; which contains
      *            multiple values and their number of occurences
      */
@@ -70,9 +69,10 @@
                 // TODO let the user choose which value he wants to edit (e.g. with a combobox)
                 int mostOccurences = 0;
-                for (String v : valuesMap.keySet())
+                for (String v : valuesMap.keySet()) {
                     if (valuesMap.get(v) > mostOccurences) {
                         value = v;
                         mostOccurences = valuesMap.get(v);
                     }
+                }
             }
         }
@@ -118,5 +118,5 @@
 
     public String[] getChangedKeyValuePair() {
-        return new String[] { oldkey, keyField.getText(), valueField.getText() };
+        return new String[] {oldkey, keyField.getText(), valueField.getText()};
     }
 
@@ -135,13 +135,13 @@
                 Main.warn(t);
                 
-                int tColumns[] = null;
+                int[] tColumns = null;
                 String info = t.getMessage();
 
                 if (t instanceof ParseException) {
                     ParseException parserExc = (ParseException) t;
-                    tColumns = new int[] { parserExc.currentToken.beginColumn - 1, parserExc.currentToken.endColumn + 1 };
+                    tColumns = new int[] {parserExc.currentToken.beginColumn - 1, parserExc.currentToken.endColumn + 1};
                 } else if (t instanceof SyntaxException) {
                     SyntaxException syntaxError = (SyntaxException) t;
-                    tColumns = new int[] { syntaxError.getStartColumn(), syntaxError.getEndColumn() };
+                    tColumns = new int[] {syntaxError.getStartColumn(), syntaxError.getEndColumn()};
                 } else if (t instanceof TokenMgrError) {
                     try {
@@ -150,5 +150,5 @@
                         if (idx > -1) {
                             int col = Integer.parseInt(info.substring(idx+"column ".length(), info.indexOf('.', idx)));
-                            tColumns = new int[] { col - 1, col + 1 };
+                            tColumns = new int[] {col - 1, col + 1};
                         }
                     } catch (IndexOutOfBoundsException e) {
Index: applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/gui/OheEditor.java
===================================================================
--- applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/gui/OheEditor.java	(revision 32582)
+++ applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/gui/OheEditor.java	(revision 32583)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.ohe.gui;
 
@@ -20,13 +21,65 @@
 
 public class OheEditor extends JPanel implements MouseListener, MouseMotionListener {
+    private final class OhePanel extends JPanel {
+        @Override
+        public void setSize(Dimension d) {
+            super.setSize(d);
+            repositionTimeRects();
+        }
+
+        @Override
+        public void paintComponent(Graphics g) {
+            if (OheEditor.this.isEnabled()) {
+                g.setColor(Color.WHITE);
+                g.fillRect(0, 0, getWidth(), getHeight());
+                
+                // draw the time from 12PM to 00AM in a different color
+                if (dialog.getHourMode() == ClockSystem.TWELVE_HOURS) {
+                    g.setColor(new Color(255, 255, 218));
+                    g.fillRect(0, getMinutePosition(12 * 60), getWidth(), getHeight() - getMinutePosition(12 * 60));
+                }
+
+                // horizontal Lines
+                for (int i = 0; i <= 24; ++i) {
+                    if (i % 3 == 0) {
+                        g.setColor(Color.BLACK);
+                    } else {
+                        g.setColor(Color.LIGHT_GRAY);
+                    }
+                    g.drawLine(0, getMinutePosition(i * 60), getWidth(), getMinutePosition(i * 60));
+                }
+
+                // vertical Lines
+                g.setColor(Color.BLACK);
+                for (int i = 0; i <= 7; ++i) {
+                    g.drawLine(getDayPosition(i), 0, getDayPosition(i), getHeight());
+                }
+
+                // if a new Rect is dragged draw it
+                if (day0 >= 0) {
+                    Graphics2D g2D = (Graphics2D) g;
+                    int day2 = Math.min(day0, day1);
+                    int day3 = Math.max(day0, day1);
+                    int minute2 = Math.min(minute0, minute1);
+                    int minute3 = Math.max(minute0, minute1);
+                    Rectangle bounds = getPanelBoundsForTimeinterval(day2, day3 + 1, minute2, minute3);
+                    TimeRect.drawTimeRect(g2D, bounds, minute2 == minute3, false);
+                }
+            } else {
+                g.setColor(Color.LIGHT_GRAY);
+                g.fillRect(0, 0, getWidth(), getHeight());
+            }
+        }
+    }
+
     final OheDialogPanel dialog;
 
-    final private JScrollPane scrollPane;
+    private final JScrollPane scrollPane;
     final JPanel contentPanel;
 
     ArrayList<TimeRect> timeRects;
 
-    final private int dayAxisHeight = 20;
-    final private int timeAxisWidth = 45;
+    private final int dayAxisHeight = 20;
+    private final int timeAxisWidth = 45;
 
     public OheEditor(OheDialogPanel oheDialogPanel) {
@@ -34,58 +87,5 @@
 
         // the MainPanel for showing the TimeRects
-        contentPanel = new JPanel() {
-            @Override
-            public void setSize(Dimension d) {
-                super.setSize(d);
-                repositionTimeRects();
-            }
-
-            @Override
-            public void paintComponent(Graphics g) {
-                if (OheEditor.this.isEnabled()) {
-                    g.setColor(Color.WHITE);
-                    g.fillRect(0, 0, getWidth(), getHeight());
-                    
-                    // draw the time from 12PM to 00AM in a different color
-                    if (dialog.getHourMode() == ClockSystem.TWELVE_HOURS) {
-                        g.setColor(new Color(255, 255, 218));
-                        g.fillRect(0, getMinutePosition(12 * 60), getWidth(), getHeight() - getMinutePosition(12 * 60));
-                    }
-
-                    // horizontal Lines
-                    for (int i = 0; i <= 24; ++i) {
-                        if (i % 3 == 0) {
-                            g.setColor(Color.BLACK);
-                        } else {
-                            g.setColor(Color.LIGHT_GRAY);
-                        }
-
-                        g.drawLine(0, getMinutePosition(i * 60), getWidth(), getMinutePosition(i * 60));
-                    }
-
-                    // vertical Lines
-                    g.setColor(Color.BLACK);
-                    for (int i = 0; i <= 7; ++i) {
-                        g.drawLine(getDayPosition(i), 0, getDayPosition(i), getHeight());
-                    }
-
-                    // if a new Rect is dragged draw it
-                    if (day0 >= 0) {
-                        Graphics2D g2D = (Graphics2D) g;
-
-                        int day2 = Math.min(day0, day1);
-                        int day3 = Math.max(day0, day1);
-                        int minute2 = Math.min(minute0, minute1);
-                        int minute3 = Math.max(minute0, minute1);
-                        Rectangle bounds = getPanelBoundsForTimeinterval(day2, day3 + 1, minute2, minute3);
-
-                        TimeRect.drawTimeRect(g2D, bounds, minute2 == minute3, false);
-                    }
-                } else {
-                    g.setColor(Color.LIGHT_GRAY);
-                    g.fillRect(0, 0, getWidth(), getHeight());
-                }
-            }
-        };
+        contentPanel = new OhePanel();
         contentPanel.addMouseListener(this);
         contentPanel.addMouseMotionListener(this);
Index: applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/gui/TimeRect.java
===================================================================
--- applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/gui/TimeRect.java	(revision 32582)
+++ applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/gui/TimeRect.java	(revision 32583)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.ohe.gui;
 
@@ -34,13 +35,13 @@
 
     public static final boolean[][] transformDirections = new boolean[][] {
-            { true, true, true, true }, // Drag
-            { true, false, false, false }, // N
-            { true, true, false, false }, // NE
-            { false, true, false, false }, // E
-            { false, true, true, false }, // SE
-            { false, false, true, false }, // S
-            { false, false, true, true }, // SW
-            { false, false, false, true }, // W
-            { true, false, false, true }, // NW
+            {true, true, true, true}, // Drag
+            {true, false, false, false}, // N
+            {true, true, false, false}, // NE
+            {false, true, false, false}, // E
+            {false, true, true, false}, // SE
+            {false, false, true, false}, // S
+            {false, false, true, true}, // SW
+            {false, false, false, true}, // W
+            {true, false, false, true}, // NW
     };
 
