Changeset 33217 in osm for applications/editors/josm/plugins
- Timestamp:
- 2017-04-08T00:59:43+02:00 (8 years ago)
- Location:
- applications/editors/josm/plugins/sds
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/sds/build.xml
r32680 r33217 5 5 <property name="commit.message" value=""/> 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="11851"/> 8 8 9 9 <!-- -
applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SeparateDataStorePlugin.java
r32705 r33217 4 4 import java.util.ArrayList; 5 5 import java.util.HashMap; 6 import java.util.List; 7 import java.util.Map; 6 8 7 9 import org.openstreetmap.josm.Main; … … 28 30 public class SeparateDataStorePlugin extends Plugin { 29 31 30 public HashMap<Long, IPrimitive> originalNodes = new HashMap<>();31 public HashMap<Long, IPrimitive> originalWays = new HashMap<>();32 public HashMap<Long, IPrimitive> originalRelations = new HashMap<>();32 public final Map<Long, IPrimitive> originalNodes = new HashMap<>(); 33 public final Map<Long, IPrimitive> originalWays = new HashMap<>(); 34 public final Map<Long, IPrimitive> originalRelations = new HashMap<>(); 33 35 34 public ArrayList<QueueItem> uploadQueue = new ArrayList<>();36 public List<QueueItem> uploadQueue = new ArrayList<>(); 35 37 36 38 private PrimitiveVisitor learnVisitor = new PrimitiveVisitor() { … … 52 54 53 55 static class QueueItem { 54 public IPrimitive primitive;55 public HashMap<String, String> tags;56 public boolean sdsOnly;56 public final IPrimitive primitive; 57 public final Map<String, String> tags; 58 public final boolean sdsOnly; 57 59 public boolean processed; 58 60 QueueItem(IPrimitive p, HashMap<String, String> t, boolean s) { … … 69 71 public SeparateDataStorePlugin(PluginInformation info) { 70 72 super(info); 71 System.out.println("initializing SDS plugin");72 73 73 // this lets us see what JOSM load from the server, and augment it with our data :74 // this lets us see what JOSM load from the server, and augment it with our data 74 75 OsmReader.registerPostprocessor(new ReadPostprocessor(this)); 75 76 76 // this makes sure that our data is never written to the OSM server on a low level ;77 OsmWriterFactory. theFactory = new SdsOsmWriterFactory(this);77 // this makes sure that our data is never written to the OSM server on a low level 78 OsmWriterFactory.setDefaultFactory(new SdsOsmWriterFactory(this)); 78 79 79 // this lets us see what JOSM is planning to upload, and prepare our own uploads 80 // accordingly 80 // this lets us see what JOSM is planning to upload, and prepare our own uploads accordingly 81 81 UploadAction.registerUploadHook(new DetermineSdsModificationsUploadHook(this)); 82 82 83 // this lets us perform our own uploads after JOSM has succeeded :83 // this lets us perform our own uploads after JOSM has succeeded 84 84 OsmServerWriter.registerPostprocessor(new WritePostprocessor(this)); 85 85 … … 141 141 return new SdsPluginPreferences(); 142 142 } 143 144 143 } 145
Note:
See TracChangeset
for help on using the changeset viewer.