Index: applications/editors/josm/plugins/junctionchecking/build.xml
===================================================================
--- applications/editors/josm/plugins/junctionchecking/build.xml	(revision 34524)
+++ applications/editors/josm/plugins/junctionchecking/build.xml	(revision 34525)
@@ -3,5 +3,5 @@
     <property name="commit.message" value="Changed the constructor signature of the plugin main class"/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="13914"/>
+    <property name="plugin.main.version" value="14153"/>
     
     <!-- Configure these properties (replace "..." accordingly).
Index: applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/ChannelDiGraphLayer.java
===================================================================
--- applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/ChannelDiGraphLayer.java	(revision 34524)
+++ applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/ChannelDiGraphLayer.java	(revision 34525)
@@ -16,8 +16,8 @@
 import javax.swing.Icon;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.Bounds;
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor;
+import org.openstreetmap.josm.data.projection.ProjectionRegistry;
 import org.openstreetmap.josm.gui.MapView;
 import org.openstreetmap.josm.gui.layer.Layer;
@@ -142,5 +142,5 @@
 
     private Point getCoord(OSMNode node, MapView mv) {
-        return mv.getPoint(Main.getProjection().latlon2eastNorth(new LatLon(node.getLatitude(), node.getLongitude())));
+        return mv.getPoint(ProjectionRegistry.getProjection().latlon2eastNorth(new LatLon(node.getLatitude(), node.getLongitude())));
     }
 
Index: applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/DigraphCreationTask.java
===================================================================
--- applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/DigraphCreationTask.java	(revision 34524)
+++ applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/DigraphCreationTask.java	(revision 34525)
@@ -9,5 +9,4 @@
 import javax.swing.JOptionPane;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.Bounds;
 import org.openstreetmap.josm.data.DataSource;
@@ -75,5 +74,5 @@
         if (MainApplication.getMap() == null
                 || !MainApplication.getMap().isVisible() || !(MainApplication.getLayerManager().getActiveLayer() instanceof OsmDataLayer)) {
-            JOptionPane.showMessageDialog(Main.parent, tr("this layer is no osm data layer"));
+            JOptionPane.showMessageDialog(MainApplication.getMainFrame(), tr("this layer is no osm data layer"));
             return;
         }
Index: applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/JunctionCheckTask.java
===================================================================
--- applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/JunctionCheckTask.java	(revision 34524)
+++ applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/JunctionCheckTask.java	(revision 34525)
@@ -10,5 +10,4 @@
 import javax.swing.JOptionPane;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.gui.PleaseWaitRunnable;
@@ -29,5 +28,5 @@
     private final int n; //Grad der Kreuzung
     private final HashSet<Channel> subset; //Teilmge der zu prüfenden Channel
-    private final boolean producerelation;
+    private final boolean produceRelation;
     private boolean canceled;
 
@@ -37,5 +36,5 @@
         this.n = n;
         this.subset = subset;
-        this.producerelation = produceRelation;
+        this.produceRelation = produceRelation;
         jc = new JunctionChecker(plugin.getChannelDigraph(), n);
     }
@@ -55,18 +54,18 @@
         if (jc.isSmallerJunction()) {
             showjunction();
-            JOptionPane.showMessageDialog(Main.parent,
+            JOptionPane.showMessageDialog(MainApplication.getMainFrame(),
                 tr("The marked channels contains a junctioncandidate (white). To test this candidat mark these channel and press the \"Check\" button again."));
         } else if (jc.getCheck()) {
             showjunction();
-            JOptionPane.showMessageDialog(Main.parent, tr("The marked channels are a {0}-ways junction", n));
+            JOptionPane.showMessageDialog(MainApplication.getMainFrame(), tr("The marked channels are a {0}-ways junction", n));
             plugin.getChannelDigraph().ereaseJunctioncandidate();
             for (int i = 0; i < jc.getSubJunction().size(); i++) {
                 plugin.getChannelDigraph().addJunctioncandidateChannel(jc.getSubJunction().get(i));
             }
-            if (producerelation) {
+            if (produceRelation) {
                 this.plugin.getRelationProducer().produceRelation(subset, n);
             }
         } else if (!jc.getCheck()) {
-            JOptionPane.showMessageDialog(Main.parent, tr("The marked channels are not a junction:") + jc.getJCheckResult());
+            JOptionPane.showMessageDialog(MainApplication.getMainFrame(), tr("The marked channels are not a junction:") + jc.getJCheckResult());
         }
     }
Index: applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/JunctionCheckerMapMode.java
===================================================================
--- applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/JunctionCheckerMapMode.java	(revision 34524)
+++ applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/JunctionCheckerMapMode.java	(revision 34525)
@@ -11,5 +11,4 @@
 import java.awt.event.MouseEvent;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.mapmode.MapMode;
 import org.openstreetmap.josm.data.coor.LatLon;
Index: applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/JunctionCheckerPlugin.java
===================================================================
--- applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/JunctionCheckerPlugin.java	(revision 34524)
+++ applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/JunctionCheckerPlugin.java	(revision 34525)
@@ -6,5 +6,4 @@
 import java.io.File;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.mapmode.MapMode;
 import org.openstreetmap.josm.gui.MainApplication;
Index: applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/JunctionSearchTask.java
===================================================================
--- applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/JunctionSearchTask.java	(revision 34524)
+++ applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/JunctionSearchTask.java	(revision 34525)
@@ -10,5 +10,5 @@
 import javax.swing.JOptionPane;
 
-import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.gui.PleaseWaitRunnable;
 import org.openstreetmap.josm.io.OsmTransferException;
@@ -54,5 +54,5 @@
         }
         ArrayList<HashSet<Channel>> junctions = jc.getJunctions();
-        JOptionPane.showMessageDialog(Main.parent, tr("Number of {0}-ways junctions found: {1}", n, junctions.size()));
+        JOptionPane.showMessageDialog(MainApplication.getMainFrame(), tr("Number of {0}-ways junctions found: {1}", n, junctions.size()));
         if (produceRelation) {
             for (int i = 0; i < junctions.size(); i++) {
Index: applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/PrepareJunctionCheckorSearch.java
===================================================================
--- applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/PrepareJunctionCheckorSearch.java	(revision 34524)
+++ applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/PrepareJunctionCheckorSearch.java	(revision 34525)
@@ -6,5 +6,4 @@
 import javax.swing.JOptionPane;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.plugins.JunctionChecker.datastructure.Channel;
@@ -22,9 +21,9 @@
     private final boolean produceRelation;
 
-    public PrepareJunctionCheckorSearch(JunctionCheckerPlugin plugin, int n, boolean producerelation) {
+    public PrepareJunctionCheckorSearch(JunctionCheckerPlugin plugin, int n, boolean produceRelation) {
         this.plugin = plugin;
         this.n = n;
         this.subset = new HashSet<>();
-        this.produceRelation = producerelation;
+        this.produceRelation = produceRelation;
     }
 
@@ -44,5 +43,5 @@
     private boolean prepareSubset() {
         if (plugin.getChannelDigraph().getSelectedChannels().size() < 6) {
-            JOptionPane.showMessageDialog(Main.parent, "Less then 6 channels are selected");
+            JOptionPane.showMessageDialog(MainApplication.getMainFrame(), "Less then 6 channels are selected");
             return false;
         }
Index: applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/commandlineinterface/CLI.java
===================================================================
--- applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/commandlineinterface/CLI.java	(revision 34524)
+++ applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/commandlineinterface/CLI.java	(revision 34525)
@@ -16,4 +16,5 @@
 import org.openstreetmap.josm.plugins.JunctionChecker.reader.XMLFilterReader;
 import org.openstreetmap.josm.plugins.JunctionChecker.writing.OSMXMLWriter;
+import org.openstreetmap.josm.tools.Logging;
 
 public final class CLI {
@@ -71,5 +72,4 @@
         StrongConnectednessCalculator scc = new StrongConnectednessCalculator(cdgb.getDigraph());
         scc.calculateSCC();
-        //System.out.println(scc.showNotstronglyConnectednessParts());
 
         if (maxchannelsearch == 0) {
@@ -77,14 +77,7 @@
             try {
                 oxw.writeXML();
-            } catch (FileNotFoundException e) {
-                // TODO Auto-generated catch block
-                e.printStackTrace();
-            } catch (XMLStreamException e) {
-                // TODO Auto-generated catch block
-                e.printStackTrace();
+            } catch (FileNotFoundException | XMLStreamException e) {
+                Logging.error(e);
             }
-            ;
-
-            System.out.println("OSMXML erzeugt, breche an dieser Stelle ab");
             return;
         }
Index: applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/ChannelDiGraph.java
===================================================================
--- applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/ChannelDiGraph.java	(revision 34524)
+++ applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/ChannelDiGraph.java	(revision 34525)
@@ -15,5 +15,5 @@
     private final ArrayList<LeadsTo> leadsTos = new ArrayList<>();
     private final HashSet<Channel> selectedChannels = new HashSet<>();
-    private HashSet<Channel> junctioncandidate = new HashSet<>();
+    private HashSet<Channel> junctionCandidate = new HashSet<>();
 
     public void setChannels(ArrayList<Channel> channels) {
@@ -271,13 +271,13 @@
 
     public HashSet<Channel> getJunctionCandidate() {
-        return junctioncandidate;
+        return junctionCandidate;
     }
 
     public void ereaseJunctioncandidate() {
-        Iterator<Channel> it = junctioncandidate.iterator();
+        Iterator<Channel> it = junctionCandidate.iterator();
         while (it.hasNext()) {
             it.next().setPartOfJunction(false);
         }
-        junctioncandidate.clear();
+        junctionCandidate.clear();
     }
 
@@ -287,6 +287,6 @@
      */
     public void setJunctioncandidate(HashSet<Channel> junctionCandidate) {
-        this.junctioncandidate.clear();
-        this.junctioncandidate = junctionCandidate;
+        this.junctionCandidate.clear();
+        this.junctionCandidate = junctionCandidate;
         Iterator<Channel> it = junctionCandidate.iterator();
         while (it.hasNext()) {
@@ -296,5 +296,5 @@
 
     public void addJunctioncandidateChannel(Channel channel) {
-        junctioncandidate.add(channel);
+        junctionCandidate.add(channel);
         channel.setPartOfJunction(true);
     }
Index: applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/junctionchecking/Combination.java
===================================================================
--- applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/junctionchecking/Combination.java	(revision 34524)
+++ applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/junctionchecking/Combination.java	(revision 34525)
@@ -1,4 +1,6 @@
 // License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.JunctionChecker.junctionchecking;
+
+import org.openstreetmap.josm.tools.Logging;
 
 public class Combination {
@@ -10,10 +12,5 @@
     public Combination(long n, long k) {
         if (n < 0 || k < 0)
-            try {
-                throw new Exception("Negative parameter in constructor");
-            } catch (Exception e) {
-                // TODO Auto-generated catch block
-                e.printStackTrace();
-            }
+            Logging.error("Negative parameter in constructor");
         this.n = n;
         this.k = k;
@@ -26,10 +23,5 @@
     public static long Choose(long n, long k) {
       if (n < 0 || k < 0)
-        try {
-            throw new Exception("Invalid negative parameter in Choose()");
-        } catch (Exception e) {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
-        }
+          Logging.error("Invalid negative parameter in Choose()");
       if (n < k) return 0;
       if (n == k) return 1;
Index: applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/reader/OSMXMLReader.java
===================================================================
--- applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/reader/OSMXMLReader.java	(revision 34524)
+++ applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/reader/OSMXMLReader.java	(revision 34525)
@@ -13,4 +13,5 @@
 import org.openstreetmap.josm.plugins.JunctionChecker.datastructure.OSMRelation;
 import org.openstreetmap.josm.plugins.JunctionChecker.datastructure.OSMWay;
+import org.openstreetmap.josm.tools.Logging;
 
 /**
@@ -175,5 +176,5 @@
             }
         } catch (XMLStreamException e) {
-            e.printStackTrace();
+            Logging.error(e);
         }
     }
Index: applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/reader/XMLFilterReader.java
===================================================================
--- applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/reader/XMLFilterReader.java	(revision 34524)
+++ applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/reader/XMLFilterReader.java	(revision 34525)
@@ -8,4 +8,5 @@
 
 import org.openstreetmap.josm.plugins.JunctionChecker.filter.Filter;
+import org.openstreetmap.josm.tools.Logging;
 
 /**
@@ -52,5 +53,5 @@
             }
         } catch (XMLStreamException e) {
-            e.printStackTrace();
+            Logging.error(e);
         }
     }
Index: applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/reader/XMLReader.java
===================================================================
--- applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/reader/XMLReader.java	(revision 34524)
+++ applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/reader/XMLReader.java	(revision 34525)
@@ -9,4 +9,6 @@
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
+
+import org.openstreetmap.josm.tools.Logging;
 
 public abstract class XMLReader {
@@ -21,5 +23,5 @@
                 .createXMLStreamReader(this.getClass().getResourceAsStream(filename));
         } catch (XMLStreamException e) {
-            e.printStackTrace();
+            Logging.error(e);
         }
     }
@@ -29,8 +31,6 @@
             parser = factory
                     .createXMLStreamReader(new FileInputStream(file));
-        } catch (FileNotFoundException e) {
-            e.printStackTrace();
-        } catch (XMLStreamException e) {
-            e.printStackTrace();
+        } catch (FileNotFoundException | XMLStreamException e) {
+            Logging.error(e);
         }
     }
