Changeset 33835 in osm for applications/editors/josm/plugins
- Timestamp:
- 2017-11-17T21:34:13+01:00 (7 years ago)
- Location:
- applications/editors/josm/plugins/undelete
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/undelete/build.xml
r32680 r33835 4 4 <property name="commit.message" value="adapt to core changes (backwards compatible)"/> 5 5 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 6 <property name="plugin.main.version" value="1 0580"/>6 <property name="plugin.main.version" value="12840"/> 7 7 8 8 <property name="plugin.author" value="Nakor"/> -
applications/editors/josm/plugins/undelete/src/org/openstreetmap/josm/plugins/undelete/Undelete.java
r32552 r33835 2 2 package org.openstreetmap.josm.plugins.undelete; 3 3 4 import org.openstreetmap.josm. Main;4 import org.openstreetmap.josm.gui.MainApplication; 5 5 import org.openstreetmap.josm.gui.MainMenu; 6 6 import org.openstreetmap.josm.plugins.Plugin; … … 11 11 public Undelete(PluginInformation info) { 12 12 super(info); 13 MainMenu.addAfter(Main .main.menu.fileMenu, new UndeleteAction(), false, Main.main.menu.updateModified);13 MainMenu.addAfter(MainApplication.getMenu().fileMenu, new UndeleteAction(), false, MainApplication.getMenu().updateModified); 14 14 } 15 15 } -
applications/editors/josm/plugins/undelete/src/org/openstreetmap/josm/plugins/undelete/UndeleteAction.java
r33480 r33835 31 31 import org.openstreetmap.josm.data.osm.history.HistoryRelation; 32 32 import org.openstreetmap.josm.data.osm.history.HistoryWay; 33 import org.openstreetmap.josm.gui.MainApplication; 33 34 import org.openstreetmap.josm.gui.Notification; 34 35 import org.openstreetmap.josm.gui.history.HistoryLoadTask; … … 36 37 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 37 38 import org.openstreetmap.josm.gui.util.GuiHelper; 39 import org.openstreetmap.josm.tools.Logging; 38 40 import org.openstreetmap.josm.tools.Shortcut; 39 41 … … 66 68 67 69 if (h == null) { 68 Main.warn("Cannot find history for " + type + " " + id);70 Logging.warn("Cannot find history for " + type + " " + id); 69 71 return; 70 72 } … … 171 173 : null; 172 174 GuiHelper.runInEDT(() -> new Notification(msg).setIcon(JOptionPane.WARNING_MESSAGE).show()); 173 Main.warn(msg);175 Logging.warn(msg); 174 176 } 175 177 } 176 178 } catch (Exception t) { 177 Main.error(t);179 Logging.error(t); 178 180 } 179 181 } … … 184 186 if (parent instanceof Way && !nodes.isEmpty()) { 185 187 ((Way) parent).setNodes(nodes); 186 Main .map.repaint();188 MainApplication.getMap().repaint(); 187 189 } 188 190 GuiHelper.runInEDT(() -> AutoScaleAction.zoomTo(layer.data.allNonDeletedPrimitives())); … … 200 202 if (dialog.showDialog().getValue() != 1) 201 203 return; 202 Main.pref.put ("undelete.newlayer", dialog.isNewLayerSelected());204 Main.pref.putBoolean("undelete.newlayer", dialog.isNewLayerSelected()); 203 205 Main.pref.put("undelete.osmid", dialog.getOsmIdsString()); 204 206 undelete(dialog.isNewLayerSelected(), dialog.getOsmIds(), null); … … 210 212 public void undelete(boolean newLayer, final List<PrimitiveId> ids, final OsmPrimitive parent) { 211 213 212 Main.info("Undeleting "+ids+(parent == null ? "" : " with parent "+parent));213 214 OsmDataLayer tmpLayer = Main .getLayerManager().getEditLayer();214 Logging.info("Undeleting "+ids+(parent == null ? "" : " with parent "+parent)); 215 216 OsmDataLayer tmpLayer = MainApplication.getLayerManager().getEditLayer(); 215 217 if ((tmpLayer == null) || newLayer) { 216 218 tmpLayer = new OsmDataLayer(new DataSet(), OsmDataLayer.createNewName(), null); 217 Main .getLayerManager().addLayer(tmpLayer);219 MainApplication.getLayerManager().addLayer(tmpLayer); 218 220 } 219 221 … … 225 227 } 226 228 227 Main .worker.execute(task);228 Main .worker.submit(new Worker(parent, layer, ids));229 MainApplication.worker.execute(task); 230 MainApplication.worker.submit(new Worker(parent, layer, ids)); 229 231 } 230 232 }
Note:
See TracChangeset
for help on using the changeset viewer.