Changeset 6046 in josm
- Timestamp:
- 2013-07-02T11:43:39+02:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/UpdateDataAction.java
r4982 r6046 44 44 } 45 45 46 @Override 46 47 public void actionPerformed(ActionEvent e) { 47 48 if (! isEnabled()) … … 83 84 // using a series of multi fetch requests 84 85 // 85 new UpdateSelectionAction().updatePrimitives(getEditLayer().data.allPrimitives());86 UpdateSelectionAction.updatePrimitives(getEditLayer().data.allPrimitives()); 86 87 } else { 87 88 // bounds defined? => use the bbox downloader … … 91 92 Main.worker.submit( 92 93 new Runnable() { 94 @Override 93 95 public void run() { 94 96 try { -
trunk/src/org/openstreetmap/josm/actions/UpdateSelectionAction.java
r5360 r6046 35 35 * @param id the primitive id 36 36 */ 37 public void handlePrimitiveGoneException(long id, OsmPrimitiveType type) {37 public static void handlePrimitiveGoneException(long id, OsmPrimitiveType type) { 38 38 MultiFetchServerObjectReader reader = new MultiFetchServerObjectReader(); 39 39 reader.append(getCurrentDataSet(),id, type); … … 53 53 * 54 54 */ 55 public void updatePrimitives(final Collection<OsmPrimitive> selection) {55 public static void updatePrimitives(final Collection<OsmPrimitive> selection) { 56 56 UpdatePrimitivesTask task = new UpdatePrimitivesTask(Main.main.getEditLayer(),selection); 57 57 Main.worker.submit(task); … … 69 69 * 70 70 */ 71 public void updatePrimitive(PrimitiveId id) throws IllegalStateException, IllegalArgumentException{71 public static void updatePrimitive(PrimitiveId id) throws IllegalStateException, IllegalArgumentException{ 72 72 ensureParameterNotNull(id, "id"); 73 73 if (getEditLayer() == null) … … 114 114 * action handler 115 115 */ 116 @Override 116 117 public void actionPerformed(ActionEvent e) { 117 118 if (! isEnabled()) 118 119 return; 119 120 Collection<OsmPrimitive> toUpdate =getData(); 120 if (toUpdate. size() == 0) {121 if (toUpdate.isEmpty()) { 121 122 JOptionPane.showMessageDialog( 122 123 Main.parent, -
trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTaskList.java
r5648 r6046 19 19 20 20 import javax.swing.JOptionPane; 21 import javax.swing.SwingUtilities;22 21 23 22 import org.openstreetmap.josm.Main; … … 32 31 import org.openstreetmap.josm.gui.progress.ProgressMonitor; 33 32 import org.openstreetmap.josm.gui.progress.ProgressMonitor.CancelListener; 33 import org.openstreetmap.josm.gui.util.GuiHelper; 34 34 import org.openstreetmap.josm.tools.ExceptionUtil; 35 35 import org.openstreetmap.josm.tools.ImageProvider; … … 74 74 } 75 75 progressMonitor.addCancelListener(new CancelListener() { 76 @Override 76 77 public void operationCanceled() { 77 78 for (DownloadTask dt : osmTasks) { … … 134 135 } 135 136 EventQueue.invokeLater(new Runnable() { 136 public void run() {137 new UpdateSelectionAction().updatePrimitives(toSelect);137 @Override public void run() { 138 UpdateSelectionAction.updatePrimitives(toSelect); 138 139 } 139 140 }); … … 217 218 * Grabs and displays the error messages after all download threads have finished. 218 219 */ 220 @Override 219 221 public void run() { 220 222 progressMonitor.finishTask(); … … 247 249 sb.append("</ul>"); 248 250 249 SwingUtilities.invokeLater(new Runnable() {251 GuiHelper.runInEDT(new Runnable() { 250 252 @Override 251 253 public void run() { … … 272 274 final OsmDataLayer editLayer = Main.map.mapView.getEditLayer(); 273 275 if (editLayer != null) { 274 Set<OsmPrimitive> myPrimitives = getCompletePrimitives(editLayer.data);276 final Set<OsmPrimitive> myPrimitives = getCompletePrimitives(editLayer.data); 275 277 for (DownloadTask task : osmTasks) { 276 278 if (task instanceof DownloadOsmTask) { … … 285 287 } 286 288 if (!myPrimitives.isEmpty()) { 287 handlePotentiallyDeletedPrimitives(myPrimitives); 289 GuiHelper.runInEDT(new Runnable() { 290 @Override public void run() { 291 handlePotentiallyDeletedPrimitives(myPrimitives); 292 } 293 }); 288 294 } 289 295 } -
trunk/src/org/openstreetmap/josm/gui/io/AbstractUploadTask.java
r5319 r6046 294 294 protected void handleGone(OsmApiPrimitiveGoneException e) { 295 295 if (e.isKnownPrimitive()) { 296 new UpdateSelectionAction().handlePrimitiveGoneException(e.getPrimitiveId(),e.getPrimitiveType());296 UpdateSelectionAction.handlePrimitiveGoneException(e.getPrimitiveId(),e.getPrimitiveType()); 297 297 } else { 298 298 ExceptionDialogUtil.explainGoneForUnknownPrimitive(e);
Note:
See TracChangeset
for help on using the changeset viewer.