Ignore:
Timestamp:
15.06.2009 20:22:46 (3 years ago)
Author:
Gubaer
Message:

fixed: bug in OsmApi.getOsmApi()
cleanup: exception handling in interfacing with OSM API
new: new action for updating individual elements with the their current state on the server (including new menu item in the file menu)
new: improved user feedback in case of conflicts
new: handles 410 Gone conflicts when uploading a changeset
new: undoable command for "purging" a primitive from the current dataset (necessary if the primitive is already deleted on the server and the user wants to remove it from its local dataset)
new: undoable command for "undeleting" an already deleted primitive on the server (kind of "cloning")
new: after a full upload, checks whether there are primitives in the local dataset which might be deleted on the server.
new: data structures for history data
new: history download support in io package

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/search/SelectionWebsiteLoader.java

    r1195 r1670  
    2222import org.openstreetmap.josm.gui.PleaseWaitRunnable; 
    2323import org.openstreetmap.josm.io.OsmIdReader; 
     24import org.openstreetmap.josm.io.OsmTransferException; 
    2425import org.openstreetmap.josm.io.ProgressInputStream; 
    2526import org.xml.sax.SAXException; 
     
    4748            for (OsmPrimitive osm : Main.ds.allNonDeletedPrimitives()) { 
    4849                if (ids.containsKey(osm.id) && osm.getClass().getName().toLowerCase().endsWith(ids.get(osm.id))) { 
    49                     if (mode == SearchAction.SearchMode.remove) 
     50                    if (mode == SearchAction.SearchMode.remove) { 
    5051                        sel.remove(osm); 
    51                     else 
     52                    } else { 
    5253                        sel.add(osm); 
     54                    } 
    5355                } 
    5456            } 
     
    5961            e.printStackTrace(); 
    6062            JOptionPane.showMessageDialog(Main.parent,tr("Parsing error in URL: \"{0}\"",url)); 
     63        } catch(OsmTransferException e) { 
     64            e.printStackTrace(); 
     65            if (e.getCause() != null) { 
     66                if (e.getCause() instanceof IOException ) { 
     67                    JOptionPane.showMessageDialog(Main.parent, tr("Could not read from URL: \"{0}\"",url), 
     68                            tr("Error"), JOptionPane.ERROR_MESSAGE); 
     69                } else if (e.getCause() instanceof SAXException) { 
     70                    JOptionPane.showMessageDialog(Main.parent,tr("Parsing error in URL: \"{0}\"",url), 
     71                            tr("Error"), JOptionPane.ERROR_MESSAGE); 
     72                } 
     73            } else { 
     74                JOptionPane.showMessageDialog(Main.parent,tr("Error while communicating with server.",url), 
     75                        tr("Error"), JOptionPane.ERROR_MESSAGE); 
     76            } 
     77 
    6178        } 
    6279    } 
     
    6683    } 
    6784    @Override protected void finish() { 
    68         if (sel != null) 
     85        if (sel != null) { 
    6986            Main.ds.setSelected(sel); 
     87        } 
    7088    } 
    7189} 
Note: See TracChangeset for help on using the changeset viewer.