Index: /applications/editors/josm/plugins/graphview/build.xml
===================================================================
--- /applications/editors/josm/plugins/graphview/build.xml	(revision 33841)
+++ /applications/editors/josm/plugins/graphview/build.xml	(revision 33842)
@@ -2,5 +2,5 @@
 <project name="graphview" default="dist" basedir=".">
     <property name="commit.message" value="option to change graph colors; closes ticket 5523 in JOSM Trac"/>
-    <property name="plugin.main.version" value="10580"/>
+    <property name="plugin.main.version" value="12987"/>
 
     <!-- Configure these properties (replace "..." accordingly).
Index: /applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/access/AccessType.java
===================================================================
--- /applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/access/AccessType.java	(revision 33841)
+++ /applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/access/AccessType.java	(revision 33842)
@@ -15,5 +15,5 @@
     UNDEFINED();
 
-    private String[] valueStrings;
+    private final String[] valueStrings;
     AccessType(String... valueStrings) {
         this.valueStrings = valueStrings;
Index: /applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/util/ValueStringParser.java
===================================================================
--- /applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/util/ValueStringParser.java	(revision 33841)
+++ /applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/core/util/ValueStringParser.java	(revision 33842)
@@ -5,5 +5,5 @@
 import java.util.regex.Pattern;
 
-import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.tools.Logging;
 
 public final class ValueStringParser {
@@ -27,5 +27,5 @@
 
         } catch (NumberFormatException nfe) {
-            Main.trace(nfe);
+            Logging.trace(nfe);
         }
 
@@ -55,5 +55,5 @@
 
                 } catch (NumberFormatException nfe) {
-                    Main.trace(nfe);
+                    Logging.trace(nfe);
                 }
             }
@@ -90,5 +90,5 @@
                 return (float) Integer.parseInt(kmhString);
             } catch (NumberFormatException nfe) {
-                Main.trace(nfe);
+                Logging.trace(nfe);
             }
         }
@@ -103,5 +103,5 @@
                 return KM_PER_MILE * mph;
             } catch (NumberFormatException nfe) {
-                Main.trace(nfe);
+                Logging.trace(nfe);
             }
         }
@@ -173,5 +173,5 @@
                 }
             } catch (NumberFormatException nfe) {
-                Main.trace(nfe);
+                Logging.trace(nfe);
             }
         }
Index: /applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/GraphViewPlugin.java
===================================================================
--- /applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/GraphViewPlugin.java	(revision 33841)
+++ /applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/GraphViewPlugin.java	(revision 33842)
@@ -18,4 +18,5 @@
 
 import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.gui.MapFrame;
 import org.openstreetmap.josm.gui.layer.LayerManager.LayerAddEvent;
@@ -50,4 +51,5 @@
 import org.openstreetmap.josm.plugins.graphview.plugin.preferences.GraphViewPreferences;
 import org.openstreetmap.josm.plugins.graphview.plugin.preferences.InternalRuleset;
+import org.openstreetmap.josm.tools.Logging;
 
 /**
@@ -123,16 +125,16 @@
                     graphViewLayer.setNodePositioner(new DefaultNodePositioner());
 
-                    Main.getLayerManager().addLayer(graphViewLayer);
+                    MainApplication.getLayerManager().addLayer(graphViewLayer);
                 }
             }
         } catch (AccessRulesetSyntaxException e) {
             JOptionPane.showMessageDialog(Main.parent, tr("Syntax exception in access ruleset:\n{0}", e));
-            Main.error(e);
+            Logging.error(e);
         } catch (FileNotFoundException e) {
             JOptionPane.showMessageDialog(Main.parent, tr("File not found:\n{0}", e));
-            Main.error(e);
+            Logging.error(e);
         } catch (IOException e) {
             JOptionPane.showMessageDialog(Main.parent, tr("Problem when accessing a file:\n{0}", e));
-            Main.error(e);
+            Logging.error(e);
         }
     }
@@ -156,11 +158,11 @@
         } catch (AccessRulesetSyntaxException e) {
             JOptionPane.showMessageDialog(Main.parent, tr("Syntax exception in access ruleset:\n{0}", e));
-            Main.error(e);
+            Logging.error(e);
         } catch (FileNotFoundException e) {
             JOptionPane.showMessageDialog(Main.parent, tr("File not found:\n", e));
-            Main.error(e);
+            Logging.error(e);
         } catch (IOException e) {
             JOptionPane.showMessageDialog(Main.parent, tr("Problem when accessing a file:\n{0}", e));
-            Main.error(e);
+            Logging.error(e);
         }
     }
@@ -225,7 +227,7 @@
                 newFrame.addToggleDialog(laneDialog);
             }
-            Main.getLayerManager().addLayerChangeListener(this);
+            MainApplication.getLayerManager().addLayerChangeListener(this);
         } else {
-            Main.getLayerManager().removeLayerChangeListener(this);
+            MainApplication.getLayerManager().removeLayerChangeListener(this);
         }
     }
@@ -235,7 +237,7 @@
         if (e.getRemovedLayer() == graphViewLayer) {
             graphViewLayer = null;
-        } else if (e.getRemovedLayer() == Main.getLayerManager().getEditLayer()) { //data layer removed
+        } else if (e.getRemovedLayer() == MainApplication.getLayerManager().getEditLayer()) { //data layer removed
             if (graphViewLayer != null) {
-                Main.getLayerManager().removeLayer(graphViewLayer);
+                MainApplication.getLayerManager().removeLayer(graphViewLayer);
                 graphViewLayer = null;
             }
Index: /applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/data/JOSMDataSource.java
===================================================================
--- /applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/data/JOSMDataSource.java	(revision 33841)
+++ /applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/data/JOSMDataSource.java	(revision 33842)
@@ -9,5 +9,4 @@
 import java.util.Set;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
@@ -15,4 +14,5 @@
 import org.openstreetmap.josm.data.osm.RelationMember;
 import org.openstreetmap.josm.data.osm.Way;
+import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.plugins.graphview.core.data.DataSource;
 import org.openstreetmap.josm.plugins.graphview.core.data.DataSourceObserver;
@@ -49,15 +49,15 @@
     @Override
     public Iterable<Node> getNodes() {
-        return new FilteredOsmPrimitiveIterable<>(Main.getLayerManager().getEditDataSet().getNodes());
+        return new FilteredOsmPrimitiveIterable<>(MainApplication.getLayerManager().getEditDataSet().getNodes());
     }
 
     @Override
     public Iterable<Relation> getRelations() {
-        return new FilteredRelationIterable(Main.getLayerManager().getEditDataSet().getRelations());
+        return new FilteredRelationIterable(MainApplication.getLayerManager().getEditDataSet().getRelations());
     }
 
     @Override
     public Iterable<Way> getWays() {
-        return new FilteredOsmPrimitiveIterable<>(Main.getLayerManager().getEditDataSet().getWays());
+        return new FilteredOsmPrimitiveIterable<>(MainApplication.getLayerManager().getEditDataSet().getWays());
     }
 
Index: /applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/dialogs/GraphViewDialog.java
===================================================================
--- /applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/dialogs/GraphViewDialog.java	(revision 33841)
+++ /applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/dialogs/GraphViewDialog.java	(revision 33842)
@@ -28,5 +28,4 @@
 import javax.swing.JPanel;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.gui.SideButton;
 import org.openstreetmap.josm.gui.dialogs.ToggleDialog;
@@ -42,4 +41,5 @@
 import org.openstreetmap.josm.plugins.graphview.plugin.preferences.GraphViewPreferences;
 import org.openstreetmap.josm.plugins.graphview.plugin.preferences.InternalRuleset;
+import org.openstreetmap.josm.tools.Logging;
 import org.openstreetmap.josm.tools.Shortcut;
 
@@ -256,5 +256,5 @@
                     } catch (IOException ioe) {
                         //don't add to rulesetFiles
-                        Main.debug(ioe);
+                        Logging.debug(ioe);
                     }
                 }
Index: /applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/preferences/GraphViewPreferences.java
===================================================================
--- /applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/preferences/GraphViewPreferences.java	(revision 33841)
+++ /applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/preferences/GraphViewPreferences.java	(revision 33842)
@@ -26,4 +26,5 @@
 
 import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.data.preferences.NamedColorProperty;
 import org.openstreetmap.josm.plugins.graphview.core.access.AccessParameters;
 import org.openstreetmap.josm.plugins.graphview.core.access.AccessType;
@@ -258,5 +259,5 @@
         }
 
-        Main.pref.put("graphview.useInternalRulesets", useInternalRulesets);
+        Main.pref.putBoolean("graphview.useInternalRulesets", useInternalRulesets);
 
         Main.pref.put("graphview.rulesetFolder", rulesetFolder.getPath());
@@ -269,9 +270,5 @@
         }
 
-        Main.pref.putColor(marktr("graphview default node"), Color.WHITE);
-        Main.pref.putColor(marktr("graphview default segment"), Color.WHITE);
-        Main.pref.putColor(marktr("graphview arrowhead core"), Color.BLACK);
-
-        Main.pref.put("graphview.separateDirections", separateDirections);
+        Main.pref.putBoolean("graphview.separateDirections", separateDirections);
 
         Main.pref.putDouble("graphview.arrowheadPlacement", arrowheadPlacement);
@@ -317,7 +314,7 @@
         }
 
-        nodeColor = Main.pref.getColor(marktr("graphview default node"), Color.WHITE);
-        segmentColor = Main.pref.getColor(marktr("graphview default segment"), Color.WHITE);
-        arrowheadFillColor = Main.pref.getColor(marktr("graphview arrowhead core"), Color.BLACK);
+        nodeColor = new NamedColorProperty(marktr("graphview default node"), Color.WHITE).get();
+        segmentColor = new NamedColorProperty(marktr("graphview default segment"), Color.WHITE).get();
+        arrowheadFillColor = new NamedColorProperty(marktr("graphview arrowhead core"), Color.BLACK).get();
         separateDirections = Main.pref.getBoolean("graphview.separateDirections", false);
 
Index: /applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/preferences/InternalRuleset.java
===================================================================
--- /applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/preferences/InternalRuleset.java	(revision 33841)
+++ /applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/preferences/InternalRuleset.java	(revision 33842)
@@ -7,5 +7,5 @@
     GERMANY("resources/accessRuleset_de.xml");
 
-    private String resourceName;
+    private final String resourceName;
 
     InternalRuleset(String resourceName) {
Index: /applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/preferences/VehiclePropertyStringParser.java
===================================================================
--- /applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/preferences/VehiclePropertyStringParser.java	(revision 33841)
+++ /applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/preferences/VehiclePropertyStringParser.java	(revision 33842)
@@ -10,8 +10,8 @@
 import java.util.List;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.plugins.graphview.core.property.VehiclePropertyType;
 import org.openstreetmap.josm.plugins.graphview.core.property.VehiclePropertyTypes;
 import org.openstreetmap.josm.plugins.graphview.core.util.ValueStringParser;
+import org.openstreetmap.josm.tools.Logging;
 
 /**
@@ -128,5 +128,5 @@
                 }
             } catch (NumberFormatException e) {
-                Main.trace(e);
+                Logging.trace(e);
             }
 
