Changeset 6248 in josm for trunk/src/org/openstreetmap/josm/gui
- Timestamp:
- 2013-09-23T16:47:50+02:00 (13 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 66 edited
-
BookmarkList.java (modified) (5 diffs)
-
GettingStarted.java (modified) (1 diff)
-
MainApplication.java (modified) (2 diffs)
-
MapStatus.java (modified) (1 diff)
-
MultiSplitLayout.java (modified) (4 diffs)
-
NavigatableComponent.java (modified) (1 diff)
-
bbox/TileSelectionBBoxChooser.java (modified) (1 diff)
-
conflict/pair/ListMergeModel.java (modified) (1 diff)
-
dialogs/ConflictDialog.java (modified) (1 diff)
-
dialogs/MapPaintDialog.java (modified) (1 diff)
-
dialogs/ToggleDialog.java (modified) (1 diff)
-
dialogs/UserListDialog.java (modified) (1 diff)
-
dialogs/changeset/query/BasicChangesetQueryPanel.java (modified) (1 diff)
-
dialogs/relation/ChildRelationBrowser.java (modified) (2 diffs)
-
dialogs/relation/DownloadRelationMemberTask.java (modified) (1 diff)
-
dialogs/relation/DownloadRelationTask.java (modified) (1 diff)
-
dialogs/relation/ParentRelationLoadingTask.java (modified) (1 diff)
-
dialogs/relation/RelationTree.java (modified) (1 diff)
-
help/HelpBrowser.java (modified) (3 diffs)
-
io/AbstractUploadTask.java (modified) (2 diffs)
-
io/CredentialDialog.java (modified) (1 diff)
-
io/DownloadFileTask.java (modified) (3 diffs)
-
io/DownloadOpenChangesetsTask.java (modified) (1 diff)
-
io/UploadLayerTask.java (modified) (3 diffs)
-
io/UploadPrimitivesTask.java (modified) (4 diffs)
-
io/UploadSelectionDialog.java (modified) (1 diff)
-
io/UploadStrategy.java (modified) (1 diff)
-
layer/GpxLayer.java (modified) (3 diffs)
-
layer/OsmDataLayer.java (modified) (1 diff)
-
layer/TMSLayer.java (modified) (2 diffs)
-
layer/geoimage/CorrelateGpxWithImages.java (modified) (2 diffs)
-
layer/geoimage/GeoImageLayer.java (modified) (2 diffs)
-
layer/geoimage/ThumbsLoader.java (modified) (5 diffs)
-
layer/gpx/ImportAudioAction.java (modified) (1 diff)
-
layer/markerlayer/MarkerLayer.java (modified) (1 diff)
-
mappaint/Cascade.java (modified) (2 diffs)
-
mappaint/MapPaintStyles.java (modified) (2 diffs)
-
mappaint/mapcss/ExpressionFactory.java (modified) (2 diffs)
-
mappaint/mapcss/MapCSSParser.jj (modified) (3 diffs)
-
mappaint/mapcss/MapCSSStyleSource.java (modified) (2 diffs)
-
mappaint/mapcss/Selector.java (modified) (2 diffs)
-
mappaint/xml/LinePrototype.java (modified) (3 diffs)
-
mappaint/xml/XmlStyleSource.java (modified) (2 diffs)
-
mappaint/xml/XmlStyleSourceHandler.java (modified) (1 diff)
-
oauth/OsmOAuthAuthorizationClient.java (modified) (1 diff)
-
preferences/SourceEditor.java (modified) (2 diffs)
-
preferences/SourceEntry.java (modified) (2 diffs)
-
preferences/ToolbarPreferences.java (modified) (4 diffs)
-
preferences/advanced/AdvancedPreference.java (modified) (4 diffs)
-
preferences/advanced/ExportProfileAction.java (modified) (4 diffs)
-
preferences/imagery/AddWMSLayerPanel.java (modified) (2 diffs)
-
preferences/map/TaggingPresetPreference.java (modified) (3 diffs)
-
preferences/server/AuthenticationPreferencesPanel.java (modified) (1 diff)
-
preferences/server/BasicAuthenticationPreferencesPanel.java (modified) (3 diffs)
-
preferences/server/OAuthAccessTokenHolder.java (modified) (3 diffs)
-
preferences/server/ProxyPreferencesPanel.java (modified) (1 diff)
-
preferences/shortcut/PrefJPanel.java (modified) (5 diffs)
-
tagging/TagTable.java (modified) (3 diffs)
-
tagging/TaggingPreset.java (modified) (3 diffs)
-
tagging/TaggingPresetItems.java (modified) (5 diffs)
-
tagging/TaggingPresetReader.java (modified) (2 diffs)
-
tagging/ac/AutoCompletionList.java (modified) (1 diff)
-
tagging/ac/AutoCompletionManager.java (modified) (2 diffs)
-
util/GuiHelper.java (modified) (2 diffs)
-
widgets/AbstractIdTextField.java (modified) (2 diffs)
-
widgets/JosmPasswordField.java (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/BookmarkList.java
r6203 r6248 112 112 bookmarks.add(new Bookmark(entry)); 113 113 } 114 catch(Exception e) { 115 System.err.println(tr("Error reading bookmark entry: %s", e.getMessage()));114 catch (Exception e) { 115 Main.error(tr("Error reading bookmark entry: %s", e.getMessage())); 116 116 } 117 117 } … … 126 126 LinkedList<Bookmark> bookmarks = new LinkedList<Bookmark>(); 127 127 if (bookmarkFile.exists()) { 128 System.out.println("Try loading obsolete bookmarks file");128 Main.info("Try loading obsolete bookmarks file"); 129 129 BufferedReader in = new BufferedReader(new InputStreamReader( 130 130 new FileInputStream(bookmarkFile), "utf-8")); … … 133 133 Matcher m = Pattern.compile("^(.+)[,\u001e](-?\\d+.\\d+)[,\u001e](-?\\d+.\\d+)[,\u001e](-?\\d+.\\d+)[,\u001e](-?\\d+.\\d+)$").matcher(line); 134 134 if (!m.matches() || m.groupCount() != 5) { 135 System.err.println(tr("Error:Unexpected line ''{0}'' in bookmark file ''{1}''",line, bookmarkFile.toString()));135 Main.error(tr("Unexpected line ''{0}'' in bookmark file ''{1}''",line, bookmarkFile.toString())); 136 136 continue; 137 137 } … … 142 142 try { 143 143 values[i] = Double.parseDouble(m.group(i+2)); 144 } catch(NumberFormatException e) { 145 System.err.println(tr("Error:Illegal double value ''{0}'' on line ''{1}'' in bookmark file ''{2}''",m.group(i+2),line, bookmarkFile.toString()));144 } catch (NumberFormatException e) { 145 Main.error(tr("Illegal double value ''{0}'' on line ''{1}'' in bookmark file ''{2}''",m.group(i+2),line, bookmarkFile.toString())); 146 146 continue; 147 147 } … … 156 156 } 157 157 save(); 158 System.out.println("Removing obsolete bookmarks file");158 Main.info("Removing obsolete bookmarks file"); 159 159 bookmarkFile.delete(); 160 160 } -
trunk/src/org/openstreetmap/josm/gui/GettingStarted.java
r6143 r6248 130 130 content = new MotdContent().updateIfRequiredString(); 131 131 } catch (IOException ex) { 132 System.out.println(tr("Warning: failed to read MOTD. Exception was: {0}", ex.toString()));132 Main.warn(tr("Failed to read MOTD. Exception was: {0}", ex.toString())); 133 133 content = "<html>" + STYLE + "<h1>" + "JOSM - " + tr("Java OpenStreetMap Editor") 134 134 + "</h1>\n<h2 align=\"center\">(" + tr("Message of the day not available") + ")</h2></html>"; -
trunk/src/org/openstreetmap/josm/gui/MainApplication.java
r6246 r6248 320 320 CustomConfigurator.XMLCommandProcessor config = new CustomConfigurator.XMLCommandProcessor(Main.pref); 321 321 for (String i : args.get(Option.LOAD_PREFERENCES)) { 322 System.out.println("Reading preferences from " + i);322 info("Reading preferences from " + i); 323 323 try { 324 324 config.openAndReadXML(Utils.openURL(new URL(i))); … … 446 446 if (Main.pref.getBoolean("debug.edt-checker.enable", Version.getInstance().isLocalBuild())) { 447 447 // Repaint manager is registered so late for a reason - there is lots of violation during startup process but they don't seem to break anything and are difficult to fix 448 System.out.println("Enabled EDT checker, wrongful access to gui from non EDT thread will be printed to console");448 info("Enabled EDT checker, wrongful access to gui from non EDT thread will be printed to console"); 449 449 RepaintManager.setCurrentManager(new CheckThreadViolationRepaintManager()); 450 450 } -
trunk/src/org/openstreetmap/josm/gui/MapStatus.java
r6106 r6248 130 130 public void appendLogMessage(String message) { 131 131 if (message != null && !message.isEmpty()) { 132 System.out.println("appendLogMessage not implemented for background tasks. Message was: " + message);132 Main.info("appendLogMessage not implemented for background tasks. Message was: " + message); 133 133 } 134 134 } -
trunk/src/org/openstreetmap/josm/gui/MultiSplitLayout.java
r6093 r6248 31 31 import java.beans.PropertyChangeListener; 32 32 import java.beans.PropertyChangeSupport; 33 import java.io.IOException;34 33 import java.io.Reader; 35 34 import java.io.StreamTokenizer; … … 45 44 import javax.swing.UIManager; 46 45 46 import org.openstreetmap.josm.Main; 47 47 import org.openstreetmap.josm.tools.Utils; 48 48 … … 1263 1263 } 1264 1264 catch (Exception e) { 1265 System.err.println(e);1265 Main.error(e); 1266 1266 } 1267 1267 finally { … … 1320 1320 return parseModel(new StringReader(s)); 1321 1321 } 1322 1323 private static void printModel(String indent, Node root) {1324 if (root instanceof Split) {1325 Split split = (Split)root;1326 System.out.println(indent + split);1327 for(Node child : split.getChildren()) {1328 printModel(indent + " ", child);1329 }1330 }1331 else {1332 System.out.println(indent + root);1333 }1334 }1335 1336 /**1337 * Print the tree with enough detail for simple debugging.1338 */1339 public static void printModel(Node root) {1340 printModel("", root);1341 }1342 1322 } -
trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java
r6203 r6248 860 860 861 861 if (perDistSq < snapDistanceSq && a < c + snapDistanceSq && b < c + snapDistanceSq) { 862 //System.err.println(Double.toHexString(perDistSq));863 864 862 List<WaySegment> wslist; 865 863 if (nearestMap.containsKey(perDistSq)) { -
trunk/src/org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.java
r6246 r6248 69 69 * // listen for BBOX events 70 70 * if (evt.getPropertyName().equals(BBoxChooser.BBOX_PROP)) { 71 * System.out.println("new bbox based on OSM tiles selected: " + (Bounds)evt.getNewValue());71 * Main.info("new bbox based on OSM tiles selected: " + (Bounds)evt.getNewValue()); 72 72 * } 73 73 * } -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMergeModel.java
r6084 r6248 719 719 return ((RelationMember)value).getMember(); 720 720 } else { 721 System.err.println("Unknown object type: "+value);721 Main.error("Unknown object type: "+value); 722 722 return null; 723 723 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java
r6104 r6248 317 317 @Override 318 318 public void onConflictsRemoved(ConflictCollection conflicts) { 319 System.err.println("1 conflict has been resolved.");319 Main.info("1 conflict has been resolved."); 320 320 refreshView(); 321 321 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java
r6084 r6248 204 204 } 205 205 if (!toReload.isEmpty()) { 206 System.out.println(trn("Reloading {0} map style.", "Reloading {0} map styles.", toReload.size(), toReload.size()));206 Main.info(trn("Reloading {0} map style.", "Reloading {0} map styles.", toReload.size(), toReload.size())); 207 207 Main.worker.submit(new MapPaintStyleLoader(toReload)); 208 208 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java
r6246 r6248 846 846 buttonActions.add(action); 847 847 } else { 848 System.err.println("Button " + button + " doesn't have action defined");848 Main.warn("Button " + button + " doesn't have action defined"); 849 849 new Exception().printStackTrace(); 850 850 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/UserListDialog.java
r6085 r6248 203 203 if (users.isEmpty()) return; 204 204 if (users.size() > 10) { 205 System.out.println(tr("Warning: only launching info browsers for the first {0} of {1} selected users", 10, users.size()));205 Main.warn(tr("Only launching info browsers for the first {0} of {1} selected users", 10, users.size())); 206 206 } 207 207 int num = Math.min(10, users.size()); -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/BasicChangesetQueryPanel.java
r6084 r6248 191 191 q = BasicQuery.valueOf(BasicQuery.class, value); 192 192 } catch(IllegalArgumentException e) { 193 System.err.println(tr("Warning: unexpected value for preference ''{0}'', got ''{1}''. Resetting to default query.","changeset-query.basic.query", value));193 Main.warn(tr("Unexpected value for preference ''{0}'', got ''{1}''. Resetting to default query.","changeset-query.basic.query", value)); 194 194 q = BasicQuery.MOST_RECENT_CHANGESETS; 195 195 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ChildRelationBrowser.java
r6084 r6248 428 428 } catch (Exception e) { 429 429 if (canceled) { 430 System.out.println(tr("Warning: Ignoring exception because task was canceled. Exception: {0}", e 431 .toString())); 430 Main.warn(tr("Ignoring exception because task was canceled. Exception: {0}", e.toString())); 432 431 return; 433 432 } … … 521 520 } catch (Exception e) { 522 521 if (canceled) { 523 System.out.println(tr("Warning: Ignoring exception because task was canceled. Exception: {0}", e 524 .toString())); 522 Main.warn(tr("Ignoring exception because task was canceled. Exception: {0}", e.toString())); 525 523 return; 526 524 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/DownloadRelationMemberTask.java
r6093 r6248 145 145 } catch (Exception e) { 146 146 if (canceled) { 147 System.out.println(tr("Warning: Ignoring exception because task was canceled. Exception: {0}", e 148 .toString())); 147 Main.warn(tr("Ignoring exception because task was canceled. Exception: {0}", e.toString())); 149 148 return; 150 149 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/DownloadRelationTask.java
r6084 r6248 108 108 } catch (Exception e) { 109 109 if (canceled) { 110 System.out.println(tr("Warning: Ignoring exception because task was canceled. Exception: {0}", e 111 .toString())); 110 Main.warn(tr("Ignoring exception because task was canceled. Exception: {0}", e.toString())); 112 111 return; 113 112 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ParentRelationLoadingTask.java
r6084 r6248 193 193 } catch(Exception e) { 194 194 if (canceled) { 195 System.out.println(tr("Warning:Ignoring exception because task was canceled. Exception: {0}", e.toString()));195 Main.warn(tr("Ignoring exception because task was canceled. Exception: {0}", e.toString())); 196 196 return; 197 197 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationTree.java
r6084 r6248 159 159 } catch(Exception e) { 160 160 if (canceled) { 161 System.out.println(tr("Warning:Ignoring exception because task was canceled. Exception: {0}", e.toString()));161 Main.warn(tr("Ignoring exception because task was canceled. Exception: {0}", e.toString())); 162 162 return; 163 163 } -
trunk/src/org/openstreetmap/josm/gui/help/HelpBrowser.java
r6105 r6248 145 145 } 146 146 } catch(Exception e) { 147 System.err.println(tr("Failed to read CSS file ''help-browser.css''. Exception is: {0}", e.toString()));147 Main.error(tr("Failed to read CSS file ''help-browser.css''. Exception is: {0}", e.toString())); 148 148 e.printStackTrace(); 149 149 return ss; … … 499 499 @Override 500 500 public void update(Observable o, Object arg) { 501 //System.out.println("BackAction: canGoBoack=" + history.canGoBack() );502 501 setEnabled(history.canGoBack()); 503 502 } … … 559 558 return true; 560 559 } 561 } catch(BadLocationException e) { 562 System.err.println(tr("Warning: bad location in HTML document. Exception was: {0}", e.toString()));560 } catch (BadLocationException e) { 561 Main.warn(tr("Bad location in HTML document. Exception was: {0}", e.toString())); 563 562 e.printStackTrace(); 564 563 } -
trunk/src/org/openstreetmap/josm/gui/io/AbstractUploadTask.java
r6199 r6248 265 265 } 266 266 } 267 System.out.println(tr("Warning: error header \"{0}\" did not match with an expected pattern", errorHeader));267 Main.warn(tr("Error header \"{0}\" did not match with an expected pattern", errorHeader)); 268 268 handleUploadConflictForUnknownConflict(); 269 269 } … … 280 280 handleUploadPreconditionFailedConflict(e, conflict); 281 281 } else { 282 System.out.println(tr("Warning: error header \"{0}\" did not match with an expected pattern", e.getErrorHeader()));282 Main.warn(tr("Error header \"{0}\" did not match with an expected pattern", e.getErrorHeader())); 283 283 ExceptionDialogUtil.explainPreconditionFailed(e); 284 284 } -
trunk/src/org/openstreetmap/josm/gui/io/CredentialDialog.java
r6087 r6248 106 106 setAlwaysOnTop(true); 107 107 } catch(SecurityException e) { 108 System.out.println(tr("Warning: failed to put Credential Dialog always on top. Caught security exception."));108 Main.warn(tr("Failed to put Credential Dialog always on top. Caught security exception.")); 109 109 } 110 110 build(); -
trunk/src/org/openstreetmap/josm/gui/io/DownloadFileTask.java
r6070 r6248 18 18 import java.util.zip.ZipFile; 19 19 20 import org.openstreetmap.josm.Main; 20 21 import org.openstreetmap.josm.gui.PleaseWaitDialog; 21 22 import org.openstreetmap.josm.gui.PleaseWaitRunnable; … … 121 122 Utils.close(out); 122 123 if (!canceled) { 123 System.out.println(tr("Download finished"));124 Main.info(tr("Download finished")); 124 125 if (unpack) { 125 System.out.println(tr("Unpacking {0} into {1}", file.getAbsolutePath(), file.getParent()));126 Main.info(tr("Unpacking {0} into {1}", file.getAbsolutePath(), file.getParent())); 126 127 unzipFileRecursively(file, file.getParent()); 127 128 file.delete(); … … 129 130 } 130 131 } catch(MalformedURLException e) { 131 String msg = tr(" Warning:Cannot download file ''{0}''. Its download link ''{1}'' is not a valid URL. Skipping download.", file.getName(), address);132 System.err.println(msg);132 String msg = tr("Cannot download file ''{0}''. Its download link ''{1}'' is not a valid URL. Skipping download.", file.getName(), address); 133 Main.warn(msg); 133 134 throw new DownloadException(msg); 134 135 } catch (IOException e) { -
trunk/src/org/openstreetmap/josm/gui/io/DownloadOpenChangesetsTask.java
r5890 r6248 117 117 im.setPartiallyIdentified(im.getUserName()); 118 118 } 119 System.err.println(tr("Warning:Failed to retrieve user infos for the current JOSM user. Exception was: {0}", e.toString()));119 Main.warn(tr("Failed to retrieve user infos for the current JOSM user. Exception was: {0}", e.toString())); 120 120 } 121 121 } -
trunk/src/org/openstreetmap/josm/gui/io/UploadLayerTask.java
r5266 r6248 7 7 import java.util.HashSet; 8 8 9 import org.openstreetmap.josm.Main; 9 10 import org.openstreetmap.josm.actions.upload.CyclicUploadDependencyException; 10 11 import org.openstreetmap.josm.data.APIDataSet; … … 93 94 // we tried to delete an already deleted primitive. 94 95 // 95 System.out.println(tr("Warning: object ''{0}'' is already deleted on the server. Skipping this object and retrying to upload.", p.getDisplayName(DefaultNameFormatter.getInstance())));96 Main.warn(tr("Object ''{0}'' is already deleted on the server. Skipping this object and retrying to upload.", p.getDisplayName(DefaultNameFormatter.getInstance()))); 96 97 processedPrimitives.addAll(writer.getProcessedPrimitives()); 97 98 processedPrimitives.add(p); … … 138 139 } catch (Exception sxe) { 139 140 if (isCanceled()) { 140 System.out.println("Ignoring exception caught because upload is canceled. Exception is: " + sxe.toString());141 Main.info("Ignoring exception caught because upload is canceled. Exception is: " + sxe.toString()); 141 142 return; 142 143 } -
trunk/src/org/openstreetmap/josm/gui/io/UploadPrimitivesTask.java
r6132 r6248 26 26 import org.openstreetmap.josm.gui.HelpAwareOptionPane; 27 27 import org.openstreetmap.josm.gui.HelpAwareOptionPane.ButtonSpec; 28 import org.openstreetmap.josm.gui.Notification; 28 29 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 29 30 import org.openstreetmap.josm.gui.progress.ProgressMonitor; … … 37 38 import org.openstreetmap.josm.tools.ImageProvider; 38 39 import org.xml.sax.SAXException; 39 40 import org.openstreetmap.josm.gui.Notification;41 40 42 41 /** … … 206 205 } 207 206 monitor.appendLogMessage(msg); 208 System.out.println(tr("Warning: {0}", msg));207 Main.warn(msg); 209 208 processedPrimitives.addAll(writer.getProcessedPrimitives()); 210 209 processedPrimitives.add(p); … … 301 300 } catch (Exception e) { 302 301 if (uploadCanceled) { 303 System.out.println(tr("Ignoring caught exception because upload is canceled. Exception is: {0}", e.toString()));302 Main.info(tr("Ignoring caught exception because upload is canceled. Exception is: {0}", e.toString())); 304 303 } else { 305 304 lastException = e; -
trunk/src/org/openstreetmap/josm/gui/io/UploadSelectionDialog.java
r6084 r6248 151 151 public List<OsmPrimitive> getSelectedPrimitives() { 152 152 ArrayList<OsmPrimitive> ret = new ArrayList<OsmPrimitive>(); 153 System.out.println("selected length:" +lstSelectedPrimitives.getSelectedIndices().length);154 for (int i=0; i< lstSelectedPrimitives.getSelectedIndices().length;i++) {155 System.out.println("selected:" +lstSelectedPrimitives.getSelectedIndices()[i]);156 }157 153 ret.addAll(lstSelectedPrimitives.getOsmPrimitiveListModel().getPrimitives(lstSelectedPrimitives.getSelectedIndices())); 158 154 ret.addAll(lstDeletedPrimitives.getOsmPrimitiveListModel().getPrimitives(lstDeletedPrimitives.getSelectedIndices())); -
trunk/src/org/openstreetmap/josm/gui/io/UploadStrategy.java
r5266 r6248 86 86 UploadStrategy strategy = fromPreference(v); 87 87 if (strategy == null) { 88 System.err.println(tr("Warning: unexpected value for key ''{0}'' in preferences, got ''{1}''", "osm-server.upload-strategy", v ));88 Main.warn(tr("Unexpected value for key ''{0}'' in preferences, got ''{1}''", "osm-server.upload-strategy", v )); 89 89 return DEFAULT_UPLOAD_STRATEGY; 90 90 } -
trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java
r6232 r6248 135 135 } 136 136 } 137 //System.out.println("scanning "+data.tracks.size()+" tracks, found min,max"+min+"--"+max);138 137 if (min==1e100 || max==-1e100) return null; 139 138 return new Date[]{new Date((long) (min * 1000)), new Date((long) (max * 1000)), }; … … 425 424 ********** STEP 1 - GET CONFIG VALUES ************************** 426 425 ****************************************************************/ 427 // Long startTime = System.currentTimeMillis();428 426 Color neutralColor = getColor(true); 429 427 String spec="layer "+getName(); … … 788 786 g.setStroke(storedStroke); 789 787 } 790 // Long duration = System.currentTimeMillis() - startTime;791 // System.out.println(duration);792 788 } // end paint 793 789 -
trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
r6084 r6248 396 396 data.setVersion(from.getVersion()); 397 397 } else if ("0.5".equals(data.getVersion()) ^ "0.5".equals(from.getVersion())) { 398 System.err.println(tr("Warning: mixing 0.6 and 0.5 data results in version 0.5"));398 Main.warn(tr("Mixing 0.6 and 0.5 data results in version 0.5")); 399 399 data.setVersion("0.5"); 400 400 } -
trunk/src/org/openstreetmap/josm/gui/layer/TMSLayer.java
r6093 r6248 329 329 String r = new Scanner(in).useDelimiter("\\A").next(); 330 330 Utils.close(in); 331 System.out.println("Successfully loaded Bing attribution data.");331 Main.info("Successfully loaded Bing attribution data."); 332 332 return r.getBytes("utf-8"); 333 333 } … … 347 347 return parseAttributionText(new InputSource(new StringReader((xml)))); 348 348 } catch (IOException ex) { 349 System.err.println("Could not connect to Bing API. Will retry in " + waitTimeSec + " seconds.");349 Main.warn("Could not connect to Bing API. Will retry in " + waitTimeSec + " seconds."); 350 350 Thread.sleep(waitTimeSec * 1000L); 351 351 waitTimeSec *= 2; -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java
r6246 r6248 1052 1052 delta = Math.round(diff - timezone*60*60); // seconds 1053 1053 1054 /* System.out.println("phto " + firstExifDate);1055 System.out.println("gpx " + firstGPXDate);1056 System.out.println("diff " + diff);1057 System.out.println("difh " + diffInH);1058 System.out.println("days " + dayOffset);1059 System.out.println("time " + tz);1060 System.out.println("fix " + timezone);1061 System.out.println("offt " + delta);*/1054 /*Main.debug("phto " + firstExifDate); 1055 Main.debug("gpx " + firstGPXDate); 1056 Main.debug("diff " + diff); 1057 Main.debug("difh " + diffInH); 1058 Main.debug("days " + dayOffset); 1059 Main.debug("time " + tz); 1060 Main.debug("fix " + timezone); 1061 Main.debug("offt " + delta);*/ 1062 1062 1063 1063 tfTimezone.getDocument().removeDocumentListener(statusBarUpdater); … … 1160 1160 1161 1161 } catch(ParseException e) { 1162 System.err.println("Error while parsing date \"" + curWpTimeStr + '"');1162 Main.error("Error while parsing date \"" + curWpTimeStr + '"'); 1163 1163 e.printStackTrace(); 1164 1164 prevWp = null; -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java
r6209 r6248 558 558 559 559 } catch (Exception ex) { // (other exceptions, e.g. #5271) 560 System.err.println("Error reading EXIF from file: "+ex);560 Main.error("Error reading EXIF from file: "+ex); 561 561 e.setExifCoor(null); 562 562 e.setPos(null); … … 651 651 652 652 if (toDelete.getFile().delete()) { 653 System.out.println("File "+toDelete.getFile().toString()+" deleted. ");653 Main.info("File "+toDelete.getFile().toString()+" deleted. "); 654 654 } else { 655 655 JOptionPane.showMessageDialog( -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ThumbsLoader.java
r6084 r6248 37 37 @Override 38 38 public void run() { 39 System.err.println("Load Thumbnails");39 Main.debug("Load Thumbnails"); 40 40 tracker = new MediaTracker(Main.map.mapView); 41 41 for (int i = 0; i < data.size(); i++) { … … 71 71 if (!cacheOff) { 72 72 BufferedImage cached = cache.getImg(cacheIdent); 73 if(cached != null) { 74 System.err.println(" from cache");73 if (cached != null) { 74 Main.debug(" from cache"); 75 75 return cached; 76 76 } … … 82 82 tracker.waitForID(0); 83 83 } catch (InterruptedException e) { 84 System.err.println(" InterruptedException");84 Main.error(" InterruptedException"); 85 85 return null; 86 86 } 87 87 if (tracker.isErrorID(1) || img.getWidth(null) <= 0 || img.getHeight(null) <= 0) { 88 System.err.println(" Invalid image");88 Main.error(" Invalid image"); 89 89 return null; 90 90 } … … 104 104 105 105 if (scaledBI.getWidth() <= 0 || scaledBI.getHeight() <= 0) { 106 System.err.println(" Invalid image");106 Main.error(" Invalid image"); 107 107 return null; 108 108 } … … 112 112 } 113 113 114 System.err.println("");115 114 return scaledBI; 116 115 } -
trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportAudioAction.java
r6104 r6248 131 131 url = wavFile.toURI().toURL(); 132 132 } catch (MalformedURLException e) { 133 System.err.println("Unable to convert filename " + wavFile.getAbsolutePath() + " to URL");133 Main.error("Unable to convert filename " + wavFile.getAbsolutePath() + " to URL"); 134 134 } 135 135 Collection<WayPoint> waypoints = new ArrayList<WayPoint>(); -
trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java
r6242 r6248 291 291 } 292 292 } catch (URISyntaxException e) { 293 Main.warn( "URISyntaxException: "+e.getMessage());293 Main.warn(e); 294 294 } 295 295 return true; -
trunk/src/org/openstreetmap/josm/gui/mappaint/Cascade.java
r6142 r6248 11 11 import java.util.regex.Pattern; 12 12 13 import org.openstreetmap.josm.Main; 13 14 import org.openstreetmap.josm.gui.mappaint.mapcss.CSSColors; 14 15 import org.openstreetmap.josm.tools.Utils; … … 49 50 if (res == null) { 50 51 if (!suppressWarnings) { 51 System.err.println(String.format("Warning: unable to convert property %s to type %s: found %s of type %s!", key, klass, o, o.getClass()));52 Main.warn(String.format("Unable to convert property %s to type %s: found %s of type %s!", key, klass, o, o.getClass())); 52 53 } 53 54 return def; -
trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java
r6174 r6248 100 100 .setHeight(height) 101 101 .setOptional(true).get(); 102 if(i == null) 103 { 104 System.out.println("Mappaint style \""+namespace+"\" ("+ref.source.getDisplayString()+") icon \"" + ref.iconName + "\" not found."); 102 if (i == null) { 103 Main.warn("Mappaint style \""+namespace+"\" ("+ref.source.getDisplayString()+") icon \"" + ref.iconName + "\" not found."); 105 104 return null; 106 105 } … … 243 242 } 244 243 } 245 System.err.println("Warning:Could not detect style type. Using default (xml).");244 Main.warn("Could not detect style type. Using default (xml)."); 246 245 return new XmlStyleSource(entry); 247 246 } 248 247 } catch (IOException e) { 249 System.err.println(tr("Warning: failed to load Mappaint styles from ''{0}''. Exception was: {1}", entry.url, e.toString()));248 Main.warn(tr("Failed to load Mappaint styles from ''{0}''. Exception was: {1}", entry.url, e.toString())); 250 249 e.printStackTrace(); 251 250 } finally { -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java
r6142 r6248 525 525 throw new RuntimeException(ex); 526 526 } catch (InvocationTargetException ex) { 527 System.err.println(ex);527 Main.error(ex); 528 528 return null; 529 529 } … … 574 574 throw new RuntimeException(ex); 575 575 } catch (InvocationTargetException ex) { 576 System.err.println(ex);576 Main.error(ex); 577 577 return null; 578 578 } -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParser.jj
r5705 r6248 27 27 import org.openstreetmap.josm.tools.Pair; 28 28 import org.openstreetmap.josm.tools.Utils; 29 import org.openstreetmap.josm.Main; 29 30 30 31 public class MapCSSParser { … … 573 574 } 574 575 575 System.err.println("Skipping to the next rule, because of an error:");576 System.err.println(e);576 Main.error("Skipping to the next rule, because of an error:"); 577 Main.error(e); 577 578 if (sheet != null) { 578 579 sheet.logError(e); … … 598 599 t.image.contains("\n")) { 599 600 ParseException e = new ParseException(String.format("Warning: end of line while reading an unquoted string at line %s column %s.", t.beginLine, t.beginColumn)); 600 System.err.println(e);601 Main.error(e); 601 602 if (sheet != null) { 602 603 sheet.logError(e); -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSource.java
r6175 r6248 15 15 import java.util.zip.ZipFile; 16 16 17 import org.openstreetmap.josm.Main; 17 18 import org.openstreetmap.josm.data.osm.Node; 18 19 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 70 71 loadMeta(); 71 72 loadCanvas(); 72 } catch(IOException e) { 73 System.err.println(tr("Warning: failed to load Mappaint styles from ''{0}''. Exception was: {1}", url, e.toString()));73 } catch (IOException e) { 74 Main.warn(tr("Failed to load Mappaint styles from ''{0}''. Exception was: {1}", url, e.toString())); 74 75 e.printStackTrace(); 75 76 logError(e); 76 77 } catch (TokenMgrError e) { 77 System.err.println(tr("Warning: failed to parse Mappaint styles from ''{0}''. Error was: {1}", url, e.getMessage()));78 Main.warn(tr("Failed to parse Mappaint styles from ''{0}''. Error was: {1}", url, e.getMessage())); 78 79 e.printStackTrace(); 79 80 logError(e); 80 81 } catch (ParseException e) { 81 System.err.println(tr("Warning: failed to parse Mappaint styles from ''{0}''. Error was: {1}", url, e.getMessage()));82 Main.warn(tr("Failed to parse Mappaint styles from ''{0}''. Error was: {1}", url, e.getMessage())); 82 83 e.printStackTrace(); 83 84 logError(new ParseException(e.getMessage())); // allow e to be garbage collected, it links to the entire token stream -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java
r6175 r6248 5 5 import java.util.regex.PatternSyntaxException; 6 6 7 import org.openstreetmap.josm.Main; 7 8 import org.openstreetmap.josm.data.osm.Node; 8 9 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 224 225 if (!c.applies(env)) return false; 225 226 } catch (PatternSyntaxException e) { 226 System.err.println("PatternSyntaxException while applying condition" + c +": "+e.getMessage());227 Main.error("PatternSyntaxException while applying condition" + c +": "+e.getMessage()); 227 228 return false; 228 229 } -
trunk/src/org/openstreetmap/josm/gui/mappaint/xml/LinePrototype.java
r3856 r6248 5 5 import java.util.List; 6 6 7 import org.openstreetmap.josm.Main; 7 8 import org.openstreetmap.josm.data.osm.visitor.paint.MapPaintSettings; 8 9 import org.openstreetmap.josm.data.osm.visitor.paint.PaintColors; … … 62 63 } 63 64 if (f < 0) { 64 System.err.println(I18n.tr("Illegal dash pattern, values must be positive"));65 Main.error(I18n.tr("Illegal dash pattern, values must be positive")); 65 66 this.dashed = null; 66 67 return; … … 70 71 this.dashed = dashed; 71 72 } else { 72 System.err.println(I18n.tr("Illegal dash pattern, at least one value must be > 0"));73 Main.error(I18n.tr("Illegal dash pattern, at least one value must be > 0")); 73 74 } 74 75 } -
trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSource.java
r6148 r6248 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 6 import java.io.IOException; 6 7 import java.io.InputStream; 7 8 import java.io.InputStreamReader; 8 import java.io.IOException;9 9 import java.util.Collection; 10 10 import java.util.Collections; … … 76 76 } 77 77 78 } catch(IOException e) { 79 System.err.println(tr("Warning: failed to load Mappaint styles from ''{0}''. Exception was: {1}", url, e.toString()));78 } catch (IOException e) { 79 Main.warn(tr("Failed to load Mappaint styles from ''{0}''. Exception was: {1}", url, e.toString())); 80 80 e.printStackTrace(); 81 81 logError(e); 82 } catch(SAXParseException e) { 83 System.err.println(tr("Warning: failed to parse Mappaint styles from ''{0}''. Error was: [{1}:{2}] {3}", url, e.getLineNumber(), e.getColumnNumber(), e.getMessage()));82 } catch (SAXParseException e) { 83 Main.warn(tr("Failed to parse Mappaint styles from ''{0}''. Error was: [{1}:{2}] {3}", url, e.getLineNumber(), e.getColumnNumber(), e.getMessage())); 84 84 e.printStackTrace(); 85 85 logError(e); 86 } catch(SAXException e) { 87 System.err.println(tr("Warning: failed to parse Mappaint styles from ''{0}''. Error was: {1}", url, e.getMessage()));86 } catch (SAXException e) { 87 Main.warn(tr("Failed to parse Mappaint styles from ''{0}''. Error was: {1}", url, e.getMessage())); 88 88 e.printStackTrace(); 89 89 logError(e); -
trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSourceHandler.java
r6246 r6248 73 73 private void error(String message) { 74 74 String warning = style.getDisplayString() + " (" + rule.cond.key + "=" + rule.cond.value + "): " + message; 75 System.err.println(warning);75 Main.warn(warning); 76 76 style.logError(new Exception(warning)); 77 77 } -
trunk/src/org/openstreetmap/josm/gui/oauth/OsmOAuthAuthorizationClient.java
r6070 r6248 110 110 con.disconnect(); 111 111 } 112 } catch(NoSuchFieldException e) { 112 } catch (NoSuchFieldException e) { 113 113 e.printStackTrace(); 114 System.err.println(tr("Warning: failed to cancel running OAuth operation"));115 } catch(SecurityException e) { 114 Main.warn(tr("Failed to cancel running OAuth operation")); 115 } catch (SecurityException e) { 116 116 e.printStackTrace(); 117 System.err.println(tr("Warning: failed to cancel running OAuth operation"));118 } catch(IllegalAccessException e) { 117 Main.warn(tr("Failed to cancel running OAuth operation")); 118 } catch (IllegalAccessException e) { 119 119 e.printStackTrace(); 120 System.err.println(tr("Warning: failed to cancel running OAuth operation"));120 Main.warn(tr("Failed to cancel running OAuth operation")); 121 121 } 122 122 } -
trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java
r6106 r6248 1247 1247 Matcher m = Pattern.compile("^\t([^:]+): *(.+)$").matcher(line); 1248 1248 if (! m.matches()) { 1249 System.err.println(tr(getStr(I18nString.ILLEGAL_FORMAT_OF_ENTRY), url, line));1249 Main.error(tr(getStr(I18nString.ILLEGAL_FORMAT_OF_ENTRY), url, line)); 1250 1250 continue; 1251 1251 } … … 1291 1291 sources.add(last = new ExtendedSourceEntry(m.group(1), m.group(2))); 1292 1292 } else { 1293 System.err.println(tr(getStr(I18nString.ILLEGAL_FORMAT_OF_ENTRY), url, line));1293 Main.error(tr(getStr(I18nString.ILLEGAL_FORMAT_OF_ENTRY), url, line)); 1294 1294 } 1295 1295 } -
trunk/src/org/openstreetmap/josm/gui/preferences/SourceEntry.java
r6152 r6248 7 7 import java.util.regex.Matcher; 8 8 import java.util.regex.Pattern; 9 10 import org.openstreetmap.josm.Main; 9 11 10 12 /** … … 127 129 return m.group(1); 128 130 } else { 129 System.err.println("Warning:Unexpected URL format: "+url);131 Main.warn("Unexpected URL format: "+url); 130 132 return url; 131 133 } -
trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java
r6070 r6248 904 904 Object tb = action.getValue("toolbar"); 905 905 if(tb == null) { 906 System.out.println(tr("Toolbar action without name: {0}",906 Main.info(tr("Toolbar action without name: {0}", 907 907 action.getClass().getName())); 908 908 continue; 909 909 } else if (!(tb instanceof String)) { 910 910 if(!(tb instanceof Boolean) || (Boolean)tb) { 911 System.out.println(tr("Strange toolbar value: {0}",911 Main.info(tr("Strange toolbar value: {0}", 912 912 action.getClass().getName())); 913 913 } … … 917 917 Action r = actions.get(toolbar); 918 918 if(r != null && r != action && !toolbar.startsWith("imagery_")) { 919 System.out.println(tr("Toolbar action {0} overwritten: {1} gets {2}",919 Main.info(tr("Toolbar action {0} overwritten: {1} gets {2}", 920 920 toolbar, r.getClass().getName(), action.getClass().getName())); 921 921 } … … 988 988 result.add(a); 989 989 } else { 990 System.out.println("Could not load tool definition "+s);990 Main.info("Could not load tool definition "+s); 991 991 } 992 992 } … … 1001 1001 public Action register(Action action) { 1002 1002 String toolbar = (String) action.getValue("toolbar"); 1003 if(toolbar == null) { 1004 System.out.println(tr("Registered toolbar action without name: {0}",1003 if (toolbar == null) { 1004 Main.info(tr("Registered toolbar action without name: {0}", 1005 1005 action.getClass().getName())); 1006 1006 } else { 1007 1007 Action r = regactions.get(toolbar); 1008 if(r != null) { 1009 System.out.println(tr("Registered toolbar action {0} overwritten: {1} gets {2}",1008 if (r != null) { 1009 Main.info(tr("Registered toolbar action {0} overwritten: {1} gets {2}", 1010 1010 toolbar, r.getClass().getName(), action.getClass().getName())); 1011 1011 } -
trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java
r6246 r6248 2 2 package org.openstreetmap.josm.gui.preferences.advanced; 3 3 4 import static org.openstreetmap.josm.tools.I18n.marktr; 4 5 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.tools.I18n.marktr;6 6 7 7 import java.awt.Dimension; … … 17 17 import java.util.Map; 18 18 import java.util.Map.Entry; 19 19 20 import javax.swing.AbstractAction; 20 21 21 import javax.swing.Box; 22 22 import javax.swing.JButton; … … 356 356 if (idx>=0) { 357 357 String t=s.substring(0,idx); 358 System.out.println(t); 359 if (profileTypes.containsKey(t)) 358 if (profileTypes.containsKey(t)) { 360 359 p.add(new ImportProfileAction(s, f, t)); 360 } 361 361 } 362 362 } … … 366 366 if (idx>=0) { 367 367 String t=s.substring(0,idx); 368 if (profileTypes.containsKey(t)) 368 if (profileTypes.containsKey(t)) { 369 369 p.add(new ImportProfileAction(s, f, t)); 370 } 370 371 } 371 372 } -
trunk/src/org/openstreetmap/josm/gui/preferences/advanced/ExportProfileAction.java
r6023 r6248 1 1 // License: GPL. See LICENSE file for details. 2 2 package org.openstreetmap.josm.gui.preferences.advanced; 3 4 import static org.openstreetmap.josm.tools.I18n.tr; 3 5 4 6 import java.awt.event.ActionEvent; … … 6 8 import java.util.ArrayList; 7 9 import java.util.Map; 10 8 11 import javax.swing.AbstractAction; 9 12 import javax.swing.JFileChooser; 10 13 import javax.swing.JOptionPane; 11 14 import javax.swing.filechooser.FileFilter; 15 12 16 import org.openstreetmap.josm.Main; 13 17 import org.openstreetmap.josm.actions.DiskAccessAction; … … 15 19 import org.openstreetmap.josm.data.Preferences; 16 20 import org.openstreetmap.josm.data.Preferences.Setting; 17 18 import static org.openstreetmap.josm.tools.I18n.tr;19 21 20 22 /** … … 70 72 if (!sel.getName().endsWith(".xml")) sel=new File(sel.getAbsolutePath()+".xml"); 71 73 if (!sel.getName().startsWith(schemaKey)) { 72 System.out.println(sel.getParentFile().getAbsolutePath()+"/"+schemaKey+"_"+sel.getName()); 73 sel =new File(sel.getParentFile().getAbsolutePath()+"/"+schemaKey+"_"+sel.getName()); 74 sel = new File(sel.getParentFile().getAbsolutePath()+"/"+schemaKey+"_"+sel.getName()); 74 75 } 75 76 return sel; -
trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddWMSLayerPanel.java
r6084 r6248 22 22 import javax.swing.JScrollPane; 23 23 24 import org.openstreetmap.josm.Main; 24 25 import org.openstreetmap.josm.data.imagery.ImageryInfo; 25 26 import org.openstreetmap.josm.gui.bbox.SlippyMapBBoxChooser; … … 83 84 JOptionPane.showMessageDialog(getParent(), tr("Could not parse WMS layer list."), 84 85 tr("WMS Error"), JOptionPane.ERROR_MESSAGE); 85 System.err.println("Could not parse WMS layer list. Incoming data:"); 86 System.err.println(ex.getIncomingData()); 86 Main.error("Could not parse WMS layer list. Incoming data:\n"+ex.getIncomingData()); 87 87 } 88 88 } -
trunk/src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java
r6246 r6248 84 84 canLoad = true; 85 85 } catch (IOException e) { 86 System.err.println(tr("Warning:Could not read tagging preset source: {0}", source));86 Main.warn(tr("Could not read tagging preset source: {0}", source)); 87 87 ExtendedDialog ed = new ExtendedDialog(Main.parent, tr("Error"), 88 88 new String[] {tr("Yes"), tr("No"), tr("Cancel")}); … … 108 108 // Should not happen, but at least show message 109 109 String msg = tr("Could not read tagging preset source {0}", source); 110 System.err.println(msg);110 Main.error(msg); 111 111 JOptionPane.showMessageDialog(Main.parent, msg); 112 112 return false; … … 135 135 136 136 if (errorMessage != null) { 137 System.err.println("Error: "+errorMessage);137 Main.error(errorMessage); 138 138 int result = JOptionPane.showConfirmDialog(Main.parent, new JLabel(errorMessage), tr("Error"), 139 139 JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.ERROR_MESSAGE); -
trunk/src/org/openstreetmap/josm/gui/preferences/server/AuthenticationPreferencesPanel.java
r6084 r6248 104 104 rbOAuth.setSelected(true); 105 105 } else { 106 System.err.println(tr("Warning:Unsupported value in preference ''{0}'', got ''{1}''. Using authentication method ''Basic Authentication''.", "osm-server.auth-method", authMethod));106 Main.warn(tr("Unsupported value in preference ''{0}'', got ''{1}''. Using authentication method ''Basic Authentication''.", "osm-server.auth-method", authMethod)); 107 107 rbBasicAuthentication.setSelected(true); 108 108 } -
trunk/src/org/openstreetmap/josm/gui/preferences/server/BasicAuthenticationPreferencesPanel.java
r5886 r6248 15 15 import javax.swing.JPanel; 16 16 17 import org.openstreetmap.josm.Main; 17 18 import org.openstreetmap.josm.gui.widgets.JosmPasswordField; 18 19 import org.openstreetmap.josm.gui.widgets.JosmTextField; … … 103 104 } catch(CredentialsAgentException e) { 104 105 e.printStackTrace(); 105 System.err.println(tr("Warning: failed to retrieve OSM credentials from credential manager."));106 System.err.println(tr("Current credential manager is of type ''{0}''", cm.getClass().getName()));106 Main.warn(tr("Failed to retrieve OSM credentials from credential manager.")); 107 Main.warn(tr("Current credential manager is of type ''{0}''", cm.getClass().getName())); 107 108 tfOsmUserName.setText(""); 108 109 tfOsmPassword.setText(""); … … 118 119 ); 119 120 cm.store(RequestorType.SERVER, OsmApi.getOsmApi().getHost(), pa); 120 } catch(CredentialsAgentException e) { 121 } catch (CredentialsAgentException e) { 121 122 e.printStackTrace(); 122 System.err.println(tr("Warning: failed to save OSM credentials to credential manager."));123 System.err.println(tr("Current credential manager is of type ''{0}''", cm.getClass().getName()));123 Main.warn(tr("Failed to save OSM credentials to credential manager.")); 124 Main.warn(tr("Current credential manager is of type ''{0}''", cm.getClass().getName())); 124 125 } 125 126 } -
trunk/src/org/openstreetmap/josm/gui/preferences/server/OAuthAccessTokenHolder.java
r4245 r6248 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 6 import org.openstreetmap.josm.Main; 6 7 import org.openstreetmap.josm.data.Preferences; 7 8 import org.openstreetmap.josm.data.oauth.OAuthToken; … … 144 145 } catch(CredentialsAgentException e) { 145 146 e.printStackTrace(); 146 System.err.println(tr("Warning:Failed to retrieve OAuth Access Token from credential manager"));147 System.err.println(tr("Current credential manager is of type ''{0}''", cm.getClass().getName()));147 Main.warn(tr("Failed to retrieve OAuth Access Token from credential manager")); 148 Main.warn(tr("Current credential manager is of type ''{0}''", cm.getClass().getName())); 148 149 } 149 150 saveToPreferences = pref.getBoolean("oauth.access-token.save-to-preferences", true); … … 175 176 } catch(CredentialsAgentException e){ 176 177 e.printStackTrace(); 177 System.err.println(tr("Warning:Failed to store OAuth Access Token to credentials manager"));178 System.err.println(tr("Current credential manager is of type ''{0}''", cm.getClass().getName()));178 Main.warn(tr("Failed to store OAuth Access Token to credentials manager")); 179 Main.warn(tr("Current credential manager is of type ''{0}''", cm.getClass().getName())); 179 180 } 180 181 } -
trunk/src/org/openstreetmap/josm/gui/preferences/server/ProxyPreferencesPanel.java
r5899 r6248 316 316 317 317 if (pp.equals(ProxyPolicy.USE_SYSTEM_SETTINGS) && ! DefaultProxySelector.willJvmRetrieveSystemProxies()) { 318 System.err.println(tr("Warning:JOSM is configured to use proxies from the system setting, but the JVM is not configured to retrieve them. Resetting preferences to ''No proxy''"));318 Main.warn(tr("JOSM is configured to use proxies from the system setting, but the JVM is not configured to retrieve them. Resetting preferences to ''No proxy''")); 319 319 pp = ProxyPolicy.NO_PROXY; 320 320 rbProxyPolicy.get(pp).setSelected(true); -
trunk/src/org/openstreetmap/josm/gui/preferences/shortcut/PrefJPanel.java
r6070 r6248 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.gui.preferences.shortcut; 3 4 import static org.openstreetmap.josm.tools.I18n.marktr; 5 import static org.openstreetmap.josm.tools.I18n.tr; 3 6 4 7 import java.awt.Color; … … 9 12 import java.awt.Insets; 10 13 import java.awt.Toolkit; 11 12 import static org.openstreetmap.josm.tools.I18n.marktr;13 import static org.openstreetmap.josm.tools.I18n.tr;14 15 14 import java.awt.event.KeyEvent; 16 15 import java.lang.reflect.Field; … … 18 17 import java.util.LinkedHashMap; 19 18 import java.util.Map; 20 21 19 import java.util.regex.PatternSyntaxException; 20 22 21 import javax.swing.AbstractAction; 23 22 import javax.swing.BorderFactory; … … 38 37 import javax.swing.event.ListSelectionListener; 39 38 import javax.swing.table.AbstractTableModel; 40 import javax.swing.table.TableModel;41 39 import javax.swing.table.DefaultTableCellRenderer; 42 40 import javax.swing.table.TableColumnModel; 43 41 import javax.swing.table.TableModel; 44 42 import javax.swing.table.TableRowSorter; 43 45 44 import org.openstreetmap.josm.Main; 46 45 import org.openstreetmap.josm.gui.widgets.JosmComboBox; 46 import org.openstreetmap.josm.gui.widgets.JosmTextField; 47 47 import org.openstreetmap.josm.gui.widgets.SelectAllOnFocusGainedDecorator; 48 48 import org.openstreetmap.josm.tools.Shortcut; 49 import org.openstreetmap.josm.gui.widgets.JosmTextField;50 49 51 50 /** … … 117 116 if (s != null && s.length() > 0 && !s.contains(unknown)) { 118 117 list.put(Integer.valueOf(i), s); 119 //System.out.println(i+": "+s);120 118 } 121 119 } catch (Exception e) { -
trunk/src/org/openstreetmap/josm/gui/tagging/TagTable.java
r6092 r6248 17 17 import java.util.Collections; 18 18 import java.util.EventObject; 19 import java.util.HashMap;20 import java.util.List;21 import java.util.Map;22 19 import java.util.concurrent.CopyOnWriteArrayList; 23 20 24 21 import javax.swing.AbstractAction; 25 import static javax.swing.Action.SHORT_DESCRIPTION;26 import static javax.swing.Action.SMALL_ICON;27 22 import javax.swing.CellEditor; 28 23 import javax.swing.DefaultListSelectionModel; … … 38 33 import javax.swing.table.TableColumn; 39 34 import javax.swing.text.JTextComponent; 35 40 36 import org.openstreetmap.josm.Main; 41 37 import org.openstreetmap.josm.actions.PasteTagsAction.TagPaster; 42 38 import org.openstreetmap.josm.data.osm.OsmPrimitive; 43 39 import org.openstreetmap.josm.data.osm.Relation; 44 45 40 import org.openstreetmap.josm.gui.dialogs.relation.RunnableAction; 41 import org.openstreetmap.josm.gui.tagging.ac.AutoCompletionList; 46 42 import org.openstreetmap.josm.gui.tagging.ac.AutoCompletionManager; 47 import org.openstreetmap.josm.gui.tagging.ac.AutoCompletionList;48 43 import org.openstreetmap.josm.tools.ImageProvider; 49 44 … … 464 459 public void setAutoCompletionManager(AutoCompletionManager autocomplete) { 465 460 if (autocomplete == null) { 466 System.out.println("argument autocomplete should not be null. Aborting.");461 Main.warn("argument autocomplete should not be null. Aborting."); 467 462 Thread.dumpStack(); 468 463 return; -
trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java
r6101 r6248 150 150 }); 151 151 } else { 152 System.out.println("Could not get presets icon " + iconName);152 Main.warn("Could not get presets icon " + iconName); 153 153 } 154 154 } … … 167 167 this.nameTemplate = new TemplateParser(pattern).parse(); 168 168 } catch (ParseError e) { 169 System.err.println("Error while parsing " + pattern + ": " + e.getMessage());169 Main.error("Error while parsing " + pattern + ": " + e.getMessage()); 170 170 throw new SAXException(e); 171 171 } … … 176 176 this.nameTemplateFilter = SearchCompiler.compile(filter, false, false); 177 177 } catch (org.openstreetmap.josm.actions.search.SearchCompiler.ParseError e) { 178 System.err.println("Error while parsing" + filter + ": " + e.getMessage());178 Main.error("Error while parsing" + filter + ": " + e.getMessage()); 179 179 throw new SAXException(e); 180 180 } -
trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java
r6246 r6248 626 626 pnl.add(aibutton, GBC.std()); 627 627 } catch (ParseException x) { 628 System.err.println("Cannot parse auto-increment value of '" + ai + "' into an integer");628 Main.error("Cannot parse auto-increment value of '" + ai + "' into an integer"); 629 629 } 630 630 } … … 673 673 String v = getValue(value); 674 674 if (v == null) { 675 System.err.println("No 'last value' support for component " + value);675 Main.error("No 'last value' support for component " + value); 676 676 return; 677 677 } … … 921 921 } else { 922 922 if (values != null) { 923 System.err.println(tr("Warning in tagging preset \"{0}-{1}\": "923 Main.warn(tr("Warning in tagging preset \"{0}-{1}\": " 924 924 + "Ignoring ''{2}'' attribute as ''{3}'' elements are given.", 925 925 key, text, "values", "list_entry")); 926 926 } 927 927 if (display_values != null || locale_display_values != null) { 928 System.err.println(tr("Warning in tagging preset \"{0}-{1}\": "928 Main.warn(tr("Warning in tagging preset \"{0}-{1}\": " 929 929 + "Ignoring ''{2}'' attribute as ''{3}'' elements are given.", 930 930 key, text, "display_values", "list_entry")); 931 931 } 932 932 if (short_descriptions != null || locale_short_descriptions != null) { 933 System.err.println(tr("Warning in tagging preset \"{0}-{1}\": "933 Main.warn(tr("Warning in tagging preset \"{0}-{1}\": " 934 934 + "Ignoring ''{2}'' attribute as ''{3}'' elements are given.", 935 935 key, text, "short_descriptions", "list_entry")); … … 963 963 value_array = (String[]) method.invoke(null); 964 964 } else { 965 System.err.println(tr("Broken tagging preset \"{0}-{1}\" - Java method given in ''values_from'' is not \"{2}\"", key, text,965 Main.error(tr("Broken tagging preset \"{0}-{1}\" - Java method given in ''values_from'' is not \"{2}\"", key, text, 966 966 "public static String[] methodName()")); 967 967 } 968 968 } catch (Exception e) { 969 System.err.println(tr("Broken tagging preset \"{0}-{1}\" - Java method given in ''values_from'' threw {2} ({3})", key, text,969 Main.error(tr("Broken tagging preset \"{0}-{1}\" - Java method given in ''values_from'' threw {2} ({3})", key, text, 970 970 e.getClass().getName(), e.getMessage())); 971 971 } … … 984 984 985 985 if (display_array.length != value_array.length) { 986 System.err.println(tr("Broken tagging preset \"{0}-{1}\" - number of items in ''display_values'' must be the same as in ''values''", key, text));986 Main.error(tr("Broken tagging preset \"{0}-{1}\" - number of items in ''display_values'' must be the same as in ''values''", key, text)); 987 987 display_array = value_array; 988 988 } 989 989 990 990 if (short_descriptions_array != null && short_descriptions_array.length != value_array.length) { 991 System.err.println(tr("Broken tagging preset \"{0}-{1}\" - number of items in ''short_descriptions'' must be the same as in ''values''", key, text));991 Main.error(tr("Broken tagging preset \"{0}-{1}\" - number of items in ''short_descriptions'' must be the same as in ''values''", key, text)); 992 992 short_descriptions_array = null; 993 993 } -
trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetReader.java
r6198 r6248 187 187 allPresets.addAll(readAll(source, validate)); 188 188 } catch (IOException e) { 189 System.err.println(e.getClass().getName()+": "+e.getMessage());190 System.err.println(source);189 Main.error(e); 190 Main.error(source); 191 191 JOptionPane.showMessageDialog( 192 192 Main.parent, … … 196 196 ); 197 197 } catch (SAXException e) { 198 System.err.println(e.getClass().getName()+": "+e.getMessage());199 System.err.println(source);198 Main.error(e); 199 Main.error(source); 200 200 JOptionPane.showMessageDialog( 201 201 Main.parent, -
trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionList.java
r6084 r6248 291 291 return list == null ? null : getFilteredItem(rowIndex); 292 292 } 293 294 public void dump() {295 System.out.println("---------------------------------");296 for (AutoCompletionListItem item: list) {297 System.out.println(item);298 }299 System.out.println("---------------------------------");300 }301 293 } -
trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionManager.java
r6068 r6248 12 12 import java.util.Set; 13 13 14 import org.openstreetmap.josm.Main; 14 15 import org.openstreetmap.josm.data.osm.DataSet; 15 16 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 156 157 presetTagCache.putAll(ki.key, ki.getValues()); 157 158 } catch (NullPointerException e) { 158 System.err.println(p+": Unable to cache "+ki);159 Main.error(p+": Unable to cache "+ki); 159 160 } 160 161 } -
trunk/src/org/openstreetmap/josm/gui/util/GuiHelper.java
r6232 r6248 2 2 package org.openstreetmap.josm.gui.util; 3 3 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 4 6 import java.awt.BasicStroke; 5 import static org.openstreetmap.josm.tools.I18n.tr;6 7 7 import java.awt.Component; 8 8 import java.awt.Container; … … 196 196 } 197 197 } catch (NumberFormatException ex) { 198 System.err.println("Error in stroke preference format: "+code);198 Main.error("Error in stroke preference format: "+code); 199 199 dash = new float[]{5.0f}; 200 200 } 201 201 if (sumAbs < 1e-1) { 202 System.err.println("Error in stroke dash fomat (all zeros): "+code);202 Main.error("Error in stroke dash fomat (all zeros): "+code); 203 203 return new BasicStroke(w); 204 204 } -
trunk/src/org/openstreetmap/josm/gui/widgets/AbstractIdTextField.java
r5899 r6248 4 4 import javax.swing.text.JTextComponent; 5 5 6 import org.openstreetmap.josm. gui.widgets.JosmTextField;6 import org.openstreetmap.josm.Main; 7 7 import org.openstreetmap.josm.tools.Utils; 8 8 … … 39 39 } 40 40 } catch (Exception e) { 41 System.err.println(e.getClass().getName()+": "+e.getMessage());41 Main.error(e); 42 42 } finally { 43 43 this.validator = validator; -
trunk/src/org/openstreetmap/josm/gui/widgets/JosmPasswordField.java
r5927 r6248 10 10 import javax.swing.text.Document; 11 11 import javax.swing.text.JTextComponent; 12 13 import org.openstreetmap.josm.Main; 12 14 13 15 /** … … 103 105 pasteAction.actionPerformed(e); 104 106 } catch (NullPointerException npe) { 105 System.err.println("NullPointerException occured because of JDK bug 6322854. "107 Main.error("NullPointerException occured because of JDK bug 6322854. " 106 108 +"Copy/Paste operation has not been performed. Please complain to Oracle: "+ 107 109 "http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6322854");
Note:
See TracChangeset
for help on using the changeset viewer.
