Index: applications/editors/josm/plugins/trustosm/build.xml
===================================================================
--- applications/editors/josm/plugins/trustosm/build.xml	(revision 33535)
+++ applications/editors/josm/plugins/trustosm/build.xml	(revision 33536)
@@ -5,5 +5,5 @@
     <property name="commit.message" value="New plugin for digital signing osm data"/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="10580" />
+    <property name="plugin.main.version" value="12663" />
     <property name="plugin.author" value="Christoph Wagner" />
     <property name="plugin.class" value="org.openstreetmap.josm.plugins.trustosm.TrustOSMplugin" />
Index: applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/TrustOSMplugin.java
===================================================================
--- applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/TrustOSMplugin.java	(revision 33535)
+++ applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/TrustOSMplugin.java	(revision 33536)
@@ -29,4 +29,5 @@
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.ExtensionFileFilter;
+import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.gui.MainMenu;
 import org.openstreetmap.josm.gui.MapFrame;
@@ -41,4 +42,5 @@
 import org.openstreetmap.josm.plugins.trustosm.io.SigImporter;
 import org.openstreetmap.josm.plugins.trustosm.util.TrustGPG;
+import org.openstreetmap.josm.tools.Logging;
 
 public class TrustOSMplugin extends Plugin {
@@ -102,9 +104,9 @@
             c.doFinal(data);
         } catch (InvalidKeyException e) {
-            Main.warn(e, "It seems that the Unrestricted Policy Files are not available in this JVM. "+
-                      "So high level crypto is not allowed. Problems may occur.");
+            Logging.log(Logging.LEVEL_WARN, "It seems that the Unrestricted Policy Files are not available in this JVM. "+
+                      "So high level crypto is not allowed. Problems may occur.", e);
             installUnrestrictedPolicyFiles();
         } catch (BadPaddingException | IllegalBlockSizeException | NoSuchPaddingException | NoSuchAlgorithmException e) {
-            Main.error(e);
+            Logging.error(e);
         }
     }
@@ -254,5 +256,5 @@
 
     public static void refreshMenu() {
-        MainMenu menu = Main.main.menu;
+        MainMenu menu = MainApplication.getMenu();
 
         if (gpgJMenu == null) {
Index: applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/actions/GetMissingDataAction.java
===================================================================
--- applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/actions/GetMissingDataAction.java	(revision 33535)
+++ applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/actions/GetMissingDataAction.java	(revision 33536)
@@ -15,4 +15,5 @@
 import org.openstreetmap.josm.actions.JosmAction;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
+import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.plugins.trustosm.TrustOSMplugin;
 import org.openstreetmap.josm.plugins.trustosm.data.TrustOsmPrimitive;
@@ -50,5 +51,5 @@
 
             if (n == JOptionPane.YES_OPTION) {
-                Main.worker.submit(new DownloadSignedOsmDataTask(missingData, Main.getLayerManager().getEditLayer()));
+                MainApplication.worker.submit(new DownloadSignedOsmDataTask(missingData, getLayerManager().getEditLayer()));
                 return true;
             }
@@ -59,5 +60,5 @@
 
     public void getMissing(Map<String, TrustOsmPrimitive> trustitems, Collection<OsmPrimitive> missingData) {
-        Collection<OsmPrimitive> presentData = Main.getLayerManager().getEditDataSet().allPrimitives();
+        Collection<OsmPrimitive> presentData = getLayerManager().getEditDataSet().allPrimitives();
         for (TrustOsmPrimitive t : trustitems.values()) {
             OsmPrimitive osm = t.getOsmPrimitive();
Index: applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/data/TrustSignatures.java
===================================================================
--- applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/data/TrustSignatures.java	(revision 33535)
+++ applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/data/TrustSignatures.java	(revision 33536)
@@ -14,5 +14,5 @@
 import org.bouncycastle.bcpg.BCPGOutputStream;
 import org.bouncycastle.openpgp.PGPSignature;
-import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.tools.Logging;
 
 public class TrustSignatures {
@@ -146,5 +146,5 @@
 
                 } catch (Exception e) {
-                    Main.error(e);
+                    Logging.error(e);
                     return "Error - read console Output";
                 }
@@ -168,5 +168,5 @@
             return baos.toString("UTF-8");
         } catch (Exception e) {
-            Main.error(e);
+            Logging.error(e);
             return "Error - read console Output";
         }
Index: applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/gui/DownloadSignedOsmDataTask.java
===================================================================
--- applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/gui/DownloadSignedOsmDataTask.java	(revision 33535)
+++ applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/gui/DownloadSignedOsmDataTask.java	(revision 33536)
@@ -10,9 +10,9 @@
 import javax.swing.SwingUtilities;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.AutoScaleAction;
 import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.gui.ExceptionDialogUtil;
+import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.gui.PleaseWaitRunnable;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
@@ -53,5 +53,5 @@
     @Override
     protected void finish() {
-        Main.map.repaint();
+        MainApplication.getMap().repaint();
         if (canceled)
             return;
Index: applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/gui/dialogs/TrustDialog.java
===================================================================
--- applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/gui/dialogs/TrustDialog.java	(revision 33535)
+++ applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/gui/dialogs/TrustDialog.java	(revision 33536)
@@ -39,9 +39,9 @@
 import javax.swing.tree.TreePath;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.JosmAction;
 import org.openstreetmap.josm.data.Bounds;
 import org.openstreetmap.josm.data.SelectionChangedListener;
 import org.openstreetmap.josm.data.osm.DataSet;
+import org.openstreetmap.josm.data.osm.DefaultNameFormatter;
 import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
@@ -51,5 +51,5 @@
 import org.openstreetmap.josm.data.osm.WaySegment;
 import org.openstreetmap.josm.data.osm.visitor.paint.PaintColors;
-import org.openstreetmap.josm.gui.DefaultNameFormatter;
+import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.gui.MapView;
 import org.openstreetmap.josm.gui.SideButton;
@@ -158,5 +158,5 @@
                         KeyEvent.VK_T, Shortcut.ALT_CTRL), 150);
 
-        Main.map.mapView.addTemporaryLayer(this);
+        MainApplication.getMap().mapView.addTemporaryLayer(this);
 
         // setting up the properties table
@@ -268,5 +268,5 @@
                         }
                     }
-                Main.map.mapView.repaint();
+                MainApplication.getMap().mapView.repaint();
             }
         });
@@ -647,5 +647,5 @@
 
         // sanity checks
-        if (Main.map.mapView == null) return;
+        if (MainApplication.getMap().mapView == null) return;
 
         Graphics2D g2 = g;
Index: applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/gui/dialogs/TrustSignaturesDialog.java
===================================================================
--- applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/gui/dialogs/TrustSignaturesDialog.java	(revision 33535)
+++ applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/gui/dialogs/TrustSignaturesDialog.java	(revision 33536)
@@ -22,6 +22,6 @@
 import org.jdesktop.swingx.JXTreeTable;
 import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.data.osm.DefaultNameFormatter;
 import org.openstreetmap.josm.data.osm.Node;
-import org.openstreetmap.josm.gui.DefaultNameFormatter;
 import org.openstreetmap.josm.gui.ExtendedDialog;
 import org.openstreetmap.josm.plugins.trustosm.TrustOSMplugin;
Index: applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/io/SigImporter.java
===================================================================
--- applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/io/SigImporter.java	(revision 33535)
+++ applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/io/SigImporter.java	(revision 33536)
@@ -11,7 +11,7 @@
 import java.util.Map;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.ExtensionFileFilter;
 import org.openstreetmap.josm.data.osm.DataSet;
+import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
 import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
@@ -44,8 +44,8 @@
 
     protected void importData(InputStream in, File associatedFile) throws IllegalDataException {
-        if (Main.getLayerManager().getEditLayer() == null) {
+        if (MainApplication.getLayerManager().getEditLayer() == null) {
             DataSet dataSet = new DataSet();
             final OsmDataLayer layer = new OsmDataLayer(dataSet, associatedFile.getName(), associatedFile);
-            Main.getLayerManager().addLayer(layer);
+            MainApplication.getLayerManager().addLayer(layer);
         }
         //        Set<OsmPrimitive> missingData = new HashSet<OsmPrimitive>();
Index: applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/io/SigReader.java
===================================================================
--- applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/io/SigReader.java	(revision 33535)
+++ applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/io/SigReader.java	(revision 33536)
@@ -21,5 +21,4 @@
 import org.bouncycastle.openpgp.PGPObjectFactory;
 import org.bouncycastle.openpgp.PGPSignatureList;
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
@@ -28,4 +27,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.gui.progress.NullProgressMonitor;
 import org.openstreetmap.josm.gui.progress.ProgressMonitor;
@@ -104,5 +104,5 @@
 
                     // search corresponding OsmPrimitive
-                    OsmPrimitive osm = Main.getLayerManager().getEditDataSet().getPrimitiveById(uid, t);
+                    OsmPrimitive osm = MainApplication.getLayerManager().getEditDataSet().getPrimitiveById(uid, t);
                     if (osm == null) {
                         switch (t) {
Index: applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/util/TrustGPG.java
===================================================================
--- applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/util/TrustGPG.java	(revision 33535)
+++ applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/util/TrustGPG.java	(revision 33536)
@@ -94,4 +94,5 @@
 import org.openstreetmap.josm.tools.GBC;
 import org.openstreetmap.josm.tools.ImageProvider;
+import org.openstreetmap.josm.tools.Logging;
 
 import com.toedter.calendar.JDateChooser;
@@ -155,6 +156,6 @@
                 generateKey();
             } catch (Exception e) {
-                Main.error(e);
-                Main.error("GPG Key Ring File could not be created in: "+
+                Logging.error(e);
+                Logging.error("GPG Key Ring File could not be created in: "+
                         Main.pref.getPluginsDirectory().getPath() + "/trustosm/gnupg/secring.gpg");
             }
@@ -242,5 +243,5 @@
                     }
                 } catch (NoSuchAlgorithmException | NoSuchProviderException | PGPException | IOException e) {
-                    Main.error(e);
+                    Logging.error(e);
                 }
             } });
