Changeset 33570 in osm for applications/editors


Ignore:
Timestamp:
2017-08-27T20:27:34+02:00 (7 years ago)
Author:
donvip
Message:

update to JOSM 12671

Location:
applications/editors/josm/plugins/poly
Files:
5 edited

Legend:

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

    r32680 r33570  
    55    <property name="commit.message" value="Commit message"/>
    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="12671"/>
    88
    99    <!-- Configure these properties (replace "..." accordingly).
  • applications/editors/josm/plugins/poly/src/poly/DownloadPolyTask.java

    r33003 r33570  
    22package poly;
    33
     4import static org.openstreetmap.josm.tools.I18n.tr;
     5
    46import java.util.concurrent.Future;
    5 import org.openstreetmap.josm.Main;
    6 import static org.openstreetmap.josm.tools.I18n.tr;
     7
    78import org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask;
    89import org.openstreetmap.josm.data.Bounds;
    910import org.openstreetmap.josm.data.osm.DataSet;
     11import org.openstreetmap.josm.gui.MainApplication;
    1012import org.openstreetmap.josm.gui.progress.ProgressMonitor;
    1113import org.openstreetmap.josm.io.OsmServerReader;
     
    2729    public Future<?> loadUrl(boolean new_layer, String url, ProgressMonitor progressMonitor) {
    2830        downloadTask = new DownloadTask(new_layer, new ServerPolyReader(url), progressMonitor);
    29         return Main.worker.submit(downloadTask);
     31        return MainApplication.worker.submit(downloadTask);
    3032    }
    3133
     
    4042    }
    4143
    42     public class ServerPolyReader extends OsmServerReader {
     44    public static class ServerPolyReader extends OsmServerReader {
    4345        private String url;
    4446
  • applications/editors/josm/plugins/poly/src/poly/PolyExporter.java

    r33003 r33570  
    2020import org.openstreetmap.josm.data.osm.RelationMember;
    2121import org.openstreetmap.josm.data.osm.Way;
     22import org.openstreetmap.josm.gui.io.importexport.OsmExporter;
    2223import org.openstreetmap.josm.gui.layer.Layer;
    2324import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    24 import org.openstreetmap.josm.io.OsmExporter;
    2525
    2626/**
  • applications/editors/josm/plugins/poly/src/poly/PolyImporter.java

    r33003 r33570  
    2020import org.openstreetmap.josm.data.osm.RelationMember;
    2121import org.openstreetmap.josm.data.osm.Way;
     22import org.openstreetmap.josm.data.osm.DataSet.UploadPolicy;
     23import org.openstreetmap.josm.gui.io.importexport.OsmImporter;
    2224import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
    2325import org.openstreetmap.josm.gui.progress.ProgressMonitor;
    2426import org.openstreetmap.josm.io.CachedFile;
    2527import org.openstreetmap.josm.io.IllegalDataException;
    26 import org.openstreetmap.josm.io.OsmImporter;
    2728import org.openstreetmap.josm.tools.CheckParameterUtil;
    2829import org.xml.sax.SAXException;
     
    142143    private DataSet constructDataSet(List<Area> areas) {
    143144        DataSet ds = new DataSet();
    144         ds.setUploadDiscouraged(true);
     145        ds.setUploadPolicy(UploadPolicy.DISCOURAGED);
    145146
    146147        boolean foundInner = false;
     
    163164    }
    164165
    165     private class Area {
     166    private static class Area {
    166167        private String name;
    167168        private String polygonName;
  • applications/editors/josm/plugins/poly/src/poly/PolyPlugin.java

    r33003 r33570  
    22package poly;
    33
    4 import org.openstreetmap.josm.Main;
    54import org.openstreetmap.josm.actions.ExtensionFileFilter;
     5import org.openstreetmap.josm.gui.MainApplication;
    66import org.openstreetmap.josm.plugins.Plugin;
    77import org.openstreetmap.josm.plugins.PluginInformation;
     
    2222        ExtensionFileFilter.addImporter(new PolyImporter());
    2323        ExtensionFileFilter.addExporter(new PolyExporter());
    24         Main.main.menu.openLocation.addDownloadTaskClass(DownloadPolyTask.class);
     24        MainApplication.getMenu().openLocation.addDownloadTaskClass(DownloadPolyTask.class);
    2525    }
    2626}
Note: See TracChangeset for help on using the changeset viewer.