Changeset 10129 in josm for trunk/src/org/openstreetmap/josm/actions/downloadtasks/ChangesetQueryTask.java
- Timestamp:
- 2016-04-09T23:24:01+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/downloadtasks/ChangesetQueryTask.java
r10124 r10129 6 6 import java.awt.Component; 7 7 import java.io.IOException; 8 import java.lang.reflect.InvocationTargetException;9 8 10 9 import javax.swing.JOptionPane; 11 import javax.swing.SwingUtilities;12 10 13 11 import org.openstreetmap.josm.Main; 14 import org.openstreetmap.josm.data.osm.ChangesetCache;15 12 import org.openstreetmap.josm.data.osm.UserInfo; 16 13 import org.openstreetmap.josm.gui.JosmUserIdentityManager; … … 22 19 import org.openstreetmap.josm.tools.CheckParameterUtil; 23 20 import org.openstreetmap.josm.tools.ExceptionUtil; 24 import org.openstreetmap.josm.tools.bugreport.BugReportExceptionHandler;25 21 import org.xml.sax.SAXException; 26 22 … … 103 99 return; 104 100 } 105 106 // update the global changeset cache with the downloaded changesets. 107 // this will trigger change events which views are listening to. They 108 // will update their views accordingly. 109 // 110 // Run on the EDT because UI updates are triggered. 111 // 112 Runnable r = new Runnable() { 113 @Override public void run() { 114 ChangesetCache.getInstance().update(downloadedChangesets); 115 } 116 }; 117 if (SwingUtilities.isEventDispatchThread()) { 118 r.run(); 119 } else { 120 try { 121 SwingUtilities.invokeAndWait(r); 122 } catch (InterruptedException e) { 123 Main.warn("InterruptedException in "+getClass().getSimpleName()+" while updating changeset cache"); 124 } catch (InvocationTargetException e) { 125 Throwable t = e.getTargetException(); 126 if (t instanceof RuntimeException) { 127 BugReportExceptionHandler.handleException(t); 128 } else if (t instanceof Exception) { 129 ExceptionUtil.explainException(e); 130 } else { 131 BugReportExceptionHandler.handleException(t); 132 } 133 } 134 } 101 updateChangesets(); 135 102 } 136 103
Note:
See TracChangeset
for help on using the changeset viewer.