Changeset 10242 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2016-05-17T13:51:23+02:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java
r10212 r10242 183 183 184 184 protected void alertFilesNotMatchingWithImporter(Collection<File> files, FileImporter importer) { 185 final StringBuilder msg = new StringBuilder(); 186 msg.append("<html>").append( 187 trn( 188 "Cannot open {0} file with the file importer ''{1}''.", 189 "Cannot open {0} files with the file importer ''{1}''.", 190 files.size(), 191 files.size(), 192 importer.filter.getDescription() 185 final StringBuilder msg = new StringBuilder(128).append("<html>").append( 186 trn("Cannot open {0} file with the file importer ''{1}''.", 187 "Cannot open {0} files with the file importer ''{1}''.", 188 files.size(), 189 files.size(), 190 importer.filter.getDescription() 193 191 ) 194 192 ).append("<br><ul>"); … … 196 194 msg.append("<li>").append(f.getAbsolutePath()).append("</li>"); 197 195 } 198 msg.append("</ul> ");196 msg.append("</ul></html>"); 199 197 200 198 HelpAwareOptionPane.showMessageDialogInEDT( … … 208 206 209 207 protected void alertFilesWithUnknownImporter(Collection<File> files) { 210 final StringBuilder msg = new StringBuilder(); 211 msg.append("<html>").append( 212 trn( 213 "Cannot open {0} file because file does not exist or no suitable file importer is available.", 214 "Cannot open {0} files because files do not exist or no suitable file importer is available.", 215 files.size(), 216 files.size() 208 final StringBuilder msg = new StringBuilder(128).append("<html>").append( 209 trn("Cannot open {0} file because file does not exist or no suitable file importer is available.", 210 "Cannot open {0} files because files do not exist or no suitable file importer is available.", 211 files.size(), 212 files.size() 217 213 ) 218 214 ).append("<br><ul>"); … … 222 218 .append("</i>)</li>"); 223 219 } 224 msg.append("</ul> ");220 msg.append("</ul></html>"); 225 221 226 222 HelpAwareOptionPane.showMessageDialogInEDT( … … 272 268 } 273 269 }); 274 // TODO when changing to Java 6: Don't cancel the 275 // task here but use different modality. (Currently 2 dialogs 270 // TODO when changing to Java 6: Don't cancel the task here but use different modality. (Currently 2 dialogs 276 271 // would block each other.) 277 272 return; -
trunk/src/org/openstreetmap/josm/actions/SearchNotesDownloadAction.java
r8855 r10242 75 75 } 76 76 77 /** 78 * Perform search. 79 * @param searchTerm search term 80 */ 77 81 public void performSearch(String searchTerm) { 78 82 79 searchTerm = searchTerm.trim();83 String trimmedSearchTerm = searchTerm.trim(); 80 84 81 85 try { 82 final long id = Long.parseLong( searchTerm);86 final long id = Long.parseLong(trimmedSearchTerm); 83 87 new DownloadNotesTask().download(id, null); 84 88 return; … … 92 96 int closedLimit = Main.pref.getInteger("osm.notes.daysCloased", 7); 93 97 94 StringBuilder sb = new StringBuilder( );98 StringBuilder sb = new StringBuilder(128); 95 99 sb.append(OsmApi.getOsmApi().getBaseUrl()) 96 100 .append("notes/search?limit=") … … 99 103 .append(closedLimit) 100 104 .append("&q=") 101 .append(Utils.encodeUrl( searchTerm));105 .append(Utils.encodeUrl(trimmedSearchTerm)); 102 106 103 107 new DownloadNotesTask().loadUrl(false, sb.toString(), null); -
trunk/src/org/openstreetmap/josm/actions/ShowStatusReportAction.java
r10226 r10242 78 78 */ 79 79 public static String getReportHeader() { 80 StringBuilder text = new StringBuilder( );80 StringBuilder text = new StringBuilder(256); 81 81 String runtimeVersion = System.getProperty("java.runtime.version"); 82 82 text.append(Version.getInstance().getReleaseAttributes()) -
trunk/src/org/openstreetmap/josm/actions/downloadtasks/AbstractDownloadTask.java
r10124 r10242 84 84 @Override 85 85 public String acceptsDocumentationSummary() { 86 StringBuilder buff = new StringBuilder( "<tr><td>");86 StringBuilder buff = new StringBuilder(128).append("<tr><td>"); 87 87 buff.append(getTitle()) 88 88 .append(":</td><td>"); -
trunk/src/org/openstreetmap/josm/data/osm/Relation.java
r9979 r10242 267 267 @Override 268 268 public String toString() { 269 StringBuilder result = new StringBuilder( );269 StringBuilder result = new StringBuilder(32); 270 270 result.append("{Relation id=") 271 271 .append(getUniqueId()) -
trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2GridShiftFile.java
r9981 r10242 271 271 @Override 272 272 public String toString() { 273 StringBuilder buff = new StringBuilder( "Headers : ");273 StringBuilder buff = new StringBuilder(256).append("Headers : "); 274 274 buff.append(overviewHeaderCount) 275 275 .append("\nSub Hdrs : ") -
trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2SubGrid.java
r9981 r10242 295 295 */ 296 296 public String getDetails() { 297 StringBuilder buff = new StringBuilder( "Sub Grid : ");297 StringBuilder buff = new StringBuilder(256).append("Sub Grid : "); 298 298 buff.append(subGridName) 299 299 .append("\nParent : ") -
trunk/src/org/openstreetmap/josm/data/validation/routines/RegexValidator.java
r9922 r10242 219 219 @Override 220 220 public String toString() { 221 StringBuilder buffer = new StringBuilder( );221 StringBuilder buffer = new StringBuilder(32); 222 222 buffer.append("RegexValidator{"); 223 223 for (int i = 0; i < patterns.length; i++) { -
trunk/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java
r10238 r10242 481 481 482 482 private static String buildDefaultToolTip(long id, Map<String, String> tags) { 483 StringBuilder sb = new StringBuilder( );483 StringBuilder sb = new StringBuilder(128); 484 484 sb.append("<html><strong>id</strong>=") 485 485 .append(id) -
trunk/src/org/openstreetmap/josm/gui/io/ChangesetCellRenderer.java
r9078 r10242 34 34 35 35 protected String buildToolTipText(Changeset cs) { 36 StringBuilder sb = new StringBuilder( );36 StringBuilder sb = new StringBuilder(64); 37 37 sb.append("<html><strong>").append(tr("Changeset id:")).append("</strong>").append(cs.getId()).append("<br>"); 38 38 if (cs.getCreatedAt() != null) { -
trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/NodeElement.java
r10240 r10242 379 379 380 380 @Override 381 382 381 public String toString() { 383 StringBuilder s = new StringBuilder( "NodeElemStyle{");382 StringBuilder s = new StringBuilder(64).append("NodeElemStyle{"); 384 383 s.append(super.toString()); 385 384 if (mapImage != null) { -
trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java
r10235 r10242 1514 1514 if (entry == null) 1515 1515 return null; 1516 StringBuilder s = new StringBuilder( "<html><b>");1516 StringBuilder s = new StringBuilder(128).append("<html><b>"); 1517 1517 if (entry.title != null) { 1518 1518 s.append(entry.title).append("</b> <span color=\"gray\">"); -
trunk/src/org/openstreetmap/josm/gui/preferences/projection/CustomProjectionChoice.java
r9059 r10242 164 164 165 165 private static JComponent build() { 166 StringBuilder s = new StringBuilder( );166 StringBuilder s = new StringBuilder(1024); 167 167 s.append("<b>+proj=...</b> - <i>").append(tr("Projection name")) 168 168 .append("</i><br> ").append(tr("Supported values:")).append(' ') -
trunk/src/org/openstreetmap/josm/io/OsmServerChangesetReader.java
r10006 r10242 45 45 protected final InputStream getChangesetInputStream(long id, boolean includeDiscussion, ProgressMonitor monitor) 46 46 throws OsmTransferException { 47 StringBuilder sb = new StringBuilder(); 48 sb.append("changeset/").append(id); 47 StringBuilder sb = new StringBuilder(48).append("changeset/").append(id); 49 48 if (includeDiscussion) { 50 49 sb.append("?include_discussion=true"); … … 201 200 try { 202 201 monitor.beginTask(tr("Downloading changeset content")); 203 StringBuilder sb = new StringBuilder(); 204 sb.append("changeset/").append(id).append("/download"); 202 StringBuilder sb = new StringBuilder(32).append("changeset/").append(id).append("/download"); 205 203 try (InputStream in = getInputStream(sb.toString(), monitor.createSubTaskMonitor(1, true))) { 206 204 if (in == null) -
trunk/src/org/openstreetmap/josm/io/remotecontrol/AddTagsDialog.java
r9543 r10242 99 99 100 100 private String getToolTip() { 101 StringBuilder sb = new StringBuilder( );101 StringBuilder sb = new StringBuilder(64); 102 102 sb.append("<html>") 103 103 .append(tr("Old values of")) -
trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
r10238 r10242 919 919 920 920 private static void alertFailedPluginUpdate(Component parent, Collection<PluginInformation> plugins) { 921 StringBuilder sb = new StringBuilder( );921 StringBuilder sb = new StringBuilder(128); 922 922 sb.append("<html>") 923 923 .append(trn( … … 1296 1296 }; 1297 1297 1298 final StringBuilder msg = new StringBuilder( );1298 final StringBuilder msg = new StringBuilder(256); 1299 1299 msg.append("<html>") 1300 1300 .append(tr("An unexpected exception occurred that may have come from the ''{0}'' plugin.", plugin.getPluginInformation().name)) -
trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java
r10178 r10242 323 323 canHtml = false; 324 324 } 325 StringBuilder result = new StringBuilder( );325 StringBuilder result = new StringBuilder(48); 326 326 if (canHtml) { 327 327 result.append("<html>"); -
trunk/src/org/openstreetmap/josm/tools/WindowGeometry.java
r10200 r10242 262 262 */ 263 263 public void remember(String preferenceKey) { 264 StringBuilder value = new StringBuilder( );264 StringBuilder value = new StringBuilder(32); 265 265 value.append("x=").append(topLeft.x).append(",y=").append(topLeft.y) 266 266 .append(",width=").append(extent.width).append(",height=").append(extent.height);
Note:
See TracChangeset
for help on using the changeset viewer.