Changeset 11649 in josm for trunk/src/org
- Timestamp:
- 2017-03-02T01:59:40+01:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/AbstractInfoAction.java
r11339 r11649 70 70 + "This may both clutter your screen with browser windows<br>" 71 71 + "and take some time to finish.", numBrowsers, numBrowsers); 72 msg = "<html>" + msg + "</html>";73 72 ButtonSpec[] spec = new ButtonSpec[] { 74 73 new ButtonSpec( … … 88 87 return 0 == HelpAwareOptionPane.showOptionDialog( 89 88 Main.parent, 90 msg,89 new StringBuilder(msg).insert(0, "<html>").append("</html>").toString(), 91 90 tr("Warning"), 92 91 JOptionPane.WARNING_MESSAGE, -
trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java
r11619 r11649 859 859 */ 860 860 public String getToolTipText() { 861 String res = getName();861 StringBuilder res = new StringBuilder(getName()); 862 862 boolean html = false; 863 String date = getDate();864 if (date != null && !date.isEmpty()) {865 res += "<br>" + tr("Date of imagery: {0}", date);863 String dateStr = getDate(); 864 if (dateStr != null && !dateStr.isEmpty()) { 865 res.append("<br>").append(tr("Date of imagery: {0}", dateStr)); 866 866 html = true; 867 867 } 868 868 if (bestMarked) { 869 res += "<br>" + tr("This imagery is marked as best in this region in other editors.");869 res.append("<br>").append(tr("This imagery is marked as best in this region in other editors.")); 870 870 html = true; 871 871 } 872 872 String desc = getDescription(); 873 873 if (desc != null && !desc.isEmpty()) { 874 res += "<br>" + desc;874 res.append("<br>").append(desc); 875 875 html = true; 876 876 } 877 877 if (html) { 878 res = "<html>" + res + "</html>";879 } 880 return res ;878 res.insert(0, "<html>").append("</html>"); 879 } 880 return res.toString(); 881 881 } 882 882 -
trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
r11633 r11649 1055 1055 File file = getAssociatedFile(); 1056 1056 if (file == null && isRenamed()) { 1057 String filename = Main.pref.get("lastDirectory") + '/' + getName(); 1058 if (!OsmImporter.FILE_FILTER.acceptName(filename)) 1059 filename = filename + '.' + extension; 1060 file = new File(filename); 1057 StringBuilder filename = new StringBuilder(Main.pref.get("lastDirectory")).append('/').append(getName()); 1058 if (!OsmImporter.FILE_FILTER.acceptName(filename.toString())) { 1059 filename.append('.').append(extension); 1060 } 1061 file = new File(filename.toString()); 1061 1062 } 1062 1063 return new FileChooserManager() -
trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddWMSLayerPanel.java
r11308 r11649 89 89 String incomingData = ex3.getIncomingData().trim(); 90 90 String title = tr("WMS Error"); 91 String message = tr("Could not parse WMS layer list.");91 StringBuilder message = new StringBuilder(tr("Could not parse WMS layer list.")); 92 92 Main.error(ex3, "Could not parse WMS layer list. Incoming data:\n"+incomingData); 93 93 if ((incomingData.startsWith("<html>") || incomingData.startsWith("<HTML>")) 94 94 && (incomingData.endsWith("</html>") || incomingData.endsWith("</HTML>"))) { 95 GuiHelper.notifyUserHtmlError(this, title, message , incomingData);95 GuiHelper.notifyUserHtmlError(this, title, message.toString(), incomingData); 96 96 } else { 97 97 if (ex3.getMessage() != null) { 98 message += '\n' + ex3.getMessage();98 message.append('\n').append(ex3.getMessage()); 99 99 } 100 JOptionPane.showMessageDialog(getParent(), message , title, JOptionPane.ERROR_MESSAGE);100 JOptionPane.showMessageDialog(getParent(), message.toString(), title, JOptionPane.ERROR_MESSAGE); 101 101 } 102 102 } -
trunk/src/org/openstreetmap/josm/io/XmlStreamParsingException.java
r11553 r11649 42 42 if (getLocation() == null) 43 43 return msg; 44 msg += ' ' + tr("(at line {0}, column {1})", getLocation().getLineNumber(), getLocation().getColumnNumber()); 44 StringBuilder sb = new StringBuilder(msg).append(' ') 45 .append(tr("(at line {0}, column {1})", getLocation().getLineNumber(), getLocation().getColumnNumber())); 45 46 int offset = getLocation().getCharacterOffset(); 46 47 if (offset > -1) { 47 msg += ". "+ tr("{0} bytes have been read", offset);48 sb.append(". ").append(tr("{0} bytes have been read", offset)); 48 49 } 49 return msg;50 return sb.toString(); 50 51 } 51 52 } -
trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
r11620 r11649 789 789 return null; 790 790 791 String prefix = ""; 792 if (isDisabled) 793 prefix = "dis:"+prefix; 791 String prefix = isDisabled ? "dis:" : ""; 794 792 if (name.startsWith("data:")) { 795 793 String url = name; -
trunk/src/org/openstreetmap/josm/tools/bugreport/ReportedException.java
r10985 r11649 135 135 136 136 private static String niceThreadName(Thread thread) { 137 String name = "Thread: " + thread.getName() + " (" + thread.getId() + ')';137 StringBuilder name = new StringBuilder("Thread: ").append(thread.getName()).append(" (").append(thread.getId()).append(')'); 138 138 ThreadGroup threadGroup = thread.getThreadGroup(); 139 139 if (threadGroup != null) { 140 name += " of " + threadGroup.getName();141 } 142 return name ;140 name.append(" of ").append(threadGroup.getName()); 141 } 142 return name.toString(); 143 143 } 144 144
Note:
See TracChangeset
for help on using the changeset viewer.