Changeset 33570 in osm for applications/editors
- Timestamp:
- 2017-08-27T20:27:34+02:00 (7 years ago)
- Location:
- applications/editors/josm/plugins/poly
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/poly/build.xml
r32680 r33570 5 5 <property name="commit.message" value="Commit message"/> 6 6 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 7 <property name="plugin.main.version" value="1 0580"/>7 <property name="plugin.main.version" value="12671"/> 8 8 9 9 <!-- Configure these properties (replace "..." accordingly). -
applications/editors/josm/plugins/poly/src/poly/DownloadPolyTask.java
r33003 r33570 2 2 package poly; 3 3 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 4 6 import java.util.concurrent.Future; 5 import org.openstreetmap.josm.Main; 6 import static org.openstreetmap.josm.tools.I18n.tr; 7 7 8 import org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask; 8 9 import org.openstreetmap.josm.data.Bounds; 9 10 import org.openstreetmap.josm.data.osm.DataSet; 11 import org.openstreetmap.josm.gui.MainApplication; 10 12 import org.openstreetmap.josm.gui.progress.ProgressMonitor; 11 13 import org.openstreetmap.josm.io.OsmServerReader; … … 27 29 public Future<?> loadUrl(boolean new_layer, String url, ProgressMonitor progressMonitor) { 28 30 downloadTask = new DownloadTask(new_layer, new ServerPolyReader(url), progressMonitor); 29 return Main .worker.submit(downloadTask);31 return MainApplication.worker.submit(downloadTask); 30 32 } 31 33 … … 40 42 } 41 43 42 public class ServerPolyReader extends OsmServerReader {44 public static class ServerPolyReader extends OsmServerReader { 43 45 private String url; 44 46 -
applications/editors/josm/plugins/poly/src/poly/PolyExporter.java
r33003 r33570 20 20 import org.openstreetmap.josm.data.osm.RelationMember; 21 21 import org.openstreetmap.josm.data.osm.Way; 22 import org.openstreetmap.josm.gui.io.importexport.OsmExporter; 22 23 import org.openstreetmap.josm.gui.layer.Layer; 23 24 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 24 import org.openstreetmap.josm.io.OsmExporter;25 25 26 26 /** -
applications/editors/josm/plugins/poly/src/poly/PolyImporter.java
r33003 r33570 20 20 import org.openstreetmap.josm.data.osm.RelationMember; 21 21 import org.openstreetmap.josm.data.osm.Way; 22 import org.openstreetmap.josm.data.osm.DataSet.UploadPolicy; 23 import org.openstreetmap.josm.gui.io.importexport.OsmImporter; 22 24 import org.openstreetmap.josm.gui.progress.NullProgressMonitor; 23 25 import org.openstreetmap.josm.gui.progress.ProgressMonitor; 24 26 import org.openstreetmap.josm.io.CachedFile; 25 27 import org.openstreetmap.josm.io.IllegalDataException; 26 import org.openstreetmap.josm.io.OsmImporter;27 28 import org.openstreetmap.josm.tools.CheckParameterUtil; 28 29 import org.xml.sax.SAXException; … … 142 143 private DataSet constructDataSet(List<Area> areas) { 143 144 DataSet ds = new DataSet(); 144 ds.setUpload Discouraged(true);145 ds.setUploadPolicy(UploadPolicy.DISCOURAGED); 145 146 146 147 boolean foundInner = false; … … 163 164 } 164 165 165 private class Area {166 private static class Area { 166 167 private String name; 167 168 private String polygonName; -
applications/editors/josm/plugins/poly/src/poly/PolyPlugin.java
r33003 r33570 2 2 package poly; 3 3 4 import org.openstreetmap.josm.Main;5 4 import org.openstreetmap.josm.actions.ExtensionFileFilter; 5 import org.openstreetmap.josm.gui.MainApplication; 6 6 import org.openstreetmap.josm.plugins.Plugin; 7 7 import org.openstreetmap.josm.plugins.PluginInformation; … … 22 22 ExtensionFileFilter.addImporter(new PolyImporter()); 23 23 ExtensionFileFilter.addExporter(new PolyExporter()); 24 Main .main.menu.openLocation.addDownloadTaskClass(DownloadPolyTask.class);24 MainApplication.getMenu().openLocation.addDownloadTaskClass(DownloadPolyTask.class); 25 25 } 26 26 }
Note:
See TracChangeset
for help on using the changeset viewer.