Ignore:
Timestamp:
2017-08-26T02:33:23+02:00 (7 years ago)
Author:
donvip
Message:

update to JOSM 12663

Location:
applications/editors/josm/plugins/trustosm
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/trustosm/build.xml

    r32680 r33536  
    55    <property name="commit.message" value="New plugin for digital signing osm data"/>
    66    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    7     <property name="plugin.main.version" value="10580" />
     7    <property name="plugin.main.version" value="12663" />
    88    <property name="plugin.author" value="Christoph Wagner" />
    99    <property name="plugin.class" value="org.openstreetmap.josm.plugins.trustosm.TrustOSMplugin" />
  • applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/TrustOSMplugin.java

    r32903 r33536  
    2929import org.openstreetmap.josm.Main;
    3030import org.openstreetmap.josm.actions.ExtensionFileFilter;
     31import org.openstreetmap.josm.gui.MainApplication;
    3132import org.openstreetmap.josm.gui.MainMenu;
    3233import org.openstreetmap.josm.gui.MapFrame;
     
    4142import org.openstreetmap.josm.plugins.trustosm.io.SigImporter;
    4243import org.openstreetmap.josm.plugins.trustosm.util.TrustGPG;
     44import org.openstreetmap.josm.tools.Logging;
    4345
    4446public class TrustOSMplugin extends Plugin {
     
    102104            c.doFinal(data);
    103105        } catch (InvalidKeyException e) {
    104             Main.warn(e, "It seems that the Unrestricted Policy Files are not available in this JVM. "+
    105                       "So high level crypto is not allowed. Problems may occur.");
     106            Logging.log(Logging.LEVEL_WARN, "It seems that the Unrestricted Policy Files are not available in this JVM. "+
     107                      "So high level crypto is not allowed. Problems may occur.", e);
    106108            installUnrestrictedPolicyFiles();
    107109        } catch (BadPaddingException | IllegalBlockSizeException | NoSuchPaddingException | NoSuchAlgorithmException e) {
    108             Main.error(e);
     110            Logging.error(e);
    109111        }
    110112    }
     
    254256
    255257    public static void refreshMenu() {
    256         MainMenu menu = Main.main.menu;
     258        MainMenu menu = MainApplication.getMenu();
    257259
    258260        if (gpgJMenu == null) {
  • applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/actions/GetMissingDataAction.java

    r32533 r33536  
    1515import org.openstreetmap.josm.actions.JosmAction;
    1616import org.openstreetmap.josm.data.osm.OsmPrimitive;
     17import org.openstreetmap.josm.gui.MainApplication;
    1718import org.openstreetmap.josm.plugins.trustosm.TrustOSMplugin;
    1819import org.openstreetmap.josm.plugins.trustosm.data.TrustOsmPrimitive;
     
    5051
    5152            if (n == JOptionPane.YES_OPTION) {
    52                 Main.worker.submit(new DownloadSignedOsmDataTask(missingData, Main.getLayerManager().getEditLayer()));
     53                MainApplication.worker.submit(new DownloadSignedOsmDataTask(missingData, getLayerManager().getEditLayer()));
    5354                return true;
    5455            }
     
    5960
    6061    public void getMissing(Map<String, TrustOsmPrimitive> trustitems, Collection<OsmPrimitive> missingData) {
    61         Collection<OsmPrimitive> presentData = Main.getLayerManager().getEditDataSet().allPrimitives();
     62        Collection<OsmPrimitive> presentData = getLayerManager().getEditDataSet().allPrimitives();
    6263        for (TrustOsmPrimitive t : trustitems.values()) {
    6364            OsmPrimitive osm = t.getOsmPrimitive();
  • applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/data/TrustSignatures.java

    r32533 r33536  
    1414import org.bouncycastle.bcpg.BCPGOutputStream;
    1515import org.bouncycastle.openpgp.PGPSignature;
    16 import org.openstreetmap.josm.Main;
     16import org.openstreetmap.josm.tools.Logging;
    1717
    1818public class TrustSignatures {
     
    146146
    147147                } catch (Exception e) {
    148                     Main.error(e);
     148                    Logging.error(e);
    149149                    return "Error - read console Output";
    150150                }
     
    168168            return baos.toString("UTF-8");
    169169        } catch (Exception e) {
    170             Main.error(e);
     170            Logging.error(e);
    171171            return "Error - read console Output";
    172172        }
  • applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/gui/DownloadSignedOsmDataTask.java

    r33058 r33536  
    1010import javax.swing.SwingUtilities;
    1111
    12 import org.openstreetmap.josm.Main;
    1312import org.openstreetmap.josm.actions.AutoScaleAction;
    1413import org.openstreetmap.josm.data.osm.DataSet;
    1514import org.openstreetmap.josm.data.osm.OsmPrimitive;
    1615import org.openstreetmap.josm.gui.ExceptionDialogUtil;
     16import org.openstreetmap.josm.gui.MainApplication;
    1717import org.openstreetmap.josm.gui.PleaseWaitRunnable;
    1818import org.openstreetmap.josm.gui.layer.OsmDataLayer;
     
    5353    @Override
    5454    protected void finish() {
    55         Main.map.repaint();
     55        MainApplication.getMap().repaint();
    5656        if (canceled)
    5757            return;
  • applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/gui/dialogs/TrustDialog.java

    r33057 r33536  
    3939import javax.swing.tree.TreePath;
    4040
    41 import org.openstreetmap.josm.Main;
    4241import org.openstreetmap.josm.actions.JosmAction;
    4342import org.openstreetmap.josm.data.Bounds;
    4443import org.openstreetmap.josm.data.SelectionChangedListener;
    4544import org.openstreetmap.josm.data.osm.DataSet;
     45import org.openstreetmap.josm.data.osm.DefaultNameFormatter;
    4646import org.openstreetmap.josm.data.osm.Node;
    4747import org.openstreetmap.josm.data.osm.OsmPrimitive;
     
    5151import org.openstreetmap.josm.data.osm.WaySegment;
    5252import org.openstreetmap.josm.data.osm.visitor.paint.PaintColors;
    53 import org.openstreetmap.josm.gui.DefaultNameFormatter;
     53import org.openstreetmap.josm.gui.MainApplication;
    5454import org.openstreetmap.josm.gui.MapView;
    5555import org.openstreetmap.josm.gui.SideButton;
     
    158158                        KeyEvent.VK_T, Shortcut.ALT_CTRL), 150);
    159159
    160         Main.map.mapView.addTemporaryLayer(this);
     160        MainApplication.getMap().mapView.addTemporaryLayer(this);
    161161
    162162        // setting up the properties table
     
    268268                        }
    269269                    }
    270                 Main.map.mapView.repaint();
     270                MainApplication.getMap().mapView.repaint();
    271271            }
    272272        });
     
    647647
    648648        // sanity checks
    649         if (Main.map.mapView == null) return;
     649        if (MainApplication.getMap().mapView == null) return;
    650650
    651651        Graphics2D g2 = g;
  • applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/gui/dialogs/TrustSignaturesDialog.java

    r32533 r33536  
    2222import org.jdesktop.swingx.JXTreeTable;
    2323import org.openstreetmap.josm.Main;
     24import org.openstreetmap.josm.data.osm.DefaultNameFormatter;
    2425import org.openstreetmap.josm.data.osm.Node;
    25 import org.openstreetmap.josm.gui.DefaultNameFormatter;
    2626import org.openstreetmap.josm.gui.ExtendedDialog;
    2727import org.openstreetmap.josm.plugins.trustosm.TrustOSMplugin;
  • applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/io/SigImporter.java

    r32533 r33536  
    1111import java.util.Map;
    1212
    13 import org.openstreetmap.josm.Main;
    1413import org.openstreetmap.josm.actions.ExtensionFileFilter;
    1514import org.openstreetmap.josm.data.osm.DataSet;
     15import org.openstreetmap.josm.gui.MainApplication;
    1616import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    1717import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
     
    4444
    4545    protected void importData(InputStream in, File associatedFile) throws IllegalDataException {
    46         if (Main.getLayerManager().getEditLayer() == null) {
     46        if (MainApplication.getLayerManager().getEditLayer() == null) {
    4747            DataSet dataSet = new DataSet();
    4848            final OsmDataLayer layer = new OsmDataLayer(dataSet, associatedFile.getName(), associatedFile);
    49             Main.getLayerManager().addLayer(layer);
     49            MainApplication.getLayerManager().addLayer(layer);
    5050        }
    5151        //        Set<OsmPrimitive> missingData = new HashSet<OsmPrimitive>();
  • applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/io/SigReader.java

    r33058 r33536  
    2121import org.bouncycastle.openpgp.PGPObjectFactory;
    2222import org.bouncycastle.openpgp.PGPSignatureList;
    23 import org.openstreetmap.josm.Main;
    2423import org.openstreetmap.josm.data.osm.Node;
    2524import org.openstreetmap.josm.data.osm.OsmPrimitive;
     
    2827import org.openstreetmap.josm.data.osm.RelationMember;
    2928import org.openstreetmap.josm.data.osm.Way;
     29import org.openstreetmap.josm.gui.MainApplication;
    3030import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
    3131import org.openstreetmap.josm.gui.progress.ProgressMonitor;
     
    104104
    105105                    // search corresponding OsmPrimitive
    106                     OsmPrimitive osm = Main.getLayerManager().getEditDataSet().getPrimitiveById(uid, t);
     106                    OsmPrimitive osm = MainApplication.getLayerManager().getEditDataSet().getPrimitiveById(uid, t);
    107107                    if (osm == null) {
    108108                        switch (t) {
  • applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/util/TrustGPG.java

    r33057 r33536  
    9494import org.openstreetmap.josm.tools.GBC;
    9595import org.openstreetmap.josm.tools.ImageProvider;
     96import org.openstreetmap.josm.tools.Logging;
    9697
    9798import com.toedter.calendar.JDateChooser;
     
    155156                generateKey();
    156157            } catch (Exception e) {
    157                 Main.error(e);
    158                 Main.error("GPG Key Ring File could not be created in: "+
     158                Logging.error(e);
     159                Logging.error("GPG Key Ring File could not be created in: "+
    159160                        Main.pref.getPluginsDirectory().getPath() + "/trustosm/gnupg/secring.gpg");
    160161            }
     
    242243                    }
    243244                } catch (NoSuchAlgorithmException | NoSuchProviderException | PGPException | IOException e) {
    244                     Main.error(e);
     245                    Logging.error(e);
    245246                }
    246247            } });
Note: See TracChangeset for help on using the changeset viewer.