Ignore:
Timestamp:
2013-06-29T01:23:39+02:00 (7 years ago)
Author:
Don-vip
Message:

fix #8827 - HTML rendering differ if run before or after having launched Help Browser

Location:
trunk/src/org/openstreetmap/josm/actions
Files:
2 edited

Legend:

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

    r6032 r6040  
    154154     */
    155155    public String findSummaryDocumentation() {
    156         String result = "";
    157         for (int i = 0; i < downloadTasks.size(); i++) {
    158             Class<? extends DownloadTask> taskClass = downloadTasks.get(i);
     156        String result = "<table>";
     157        for (Class<? extends DownloadTask> taskClass : downloadTasks) {
    159158            if (taskClass != null) {
    160159                try {
    161160                    DownloadTask task = taskClass.getConstructor().newInstance();
    162                     result += "<br/>" + task.acceptsDocumentationSummary();
     161                    result += task.acceptsDocumentationSummary();
    163162                } catch (Exception e) {
    164163                    e.printStackTrace();
     
    166165            }
    167166        }
     167        result += "</table>";
    168168        return result;
    169169    }
     
    187187        } else {
    188188            final String details = findSummaryDocumentation();    // Explain what patterns are supported
    189             HelpAwareOptionPane.showMessageDialogInEDT(Main.parent, tr(
    190                     "<html><p>Cannot open URL ''{0}''<br/>The following download tasks accept the URL patterns shown:<br/>{1}</p></html>",
    191                     url, details), tr("Download Location"), JOptionPane.ERROR_MESSAGE, HelpUtil.ht("/Action/OpenLocation"));
     189            HelpAwareOptionPane.showMessageDialogInEDT(Main.parent, "<html><p>" + tr(
     190                    "Cannot open URL ''{0}''<br>The following download tasks accept the URL patterns shown:<br>{1}",
     191                    url, details) + "</p></html>", tr("Download Location"), JOptionPane.ERROR_MESSAGE, HelpUtil.ht("/Action/OpenLocation"));
    192192        }
    193193    }
  • trunk/src/org/openstreetmap/josm/actions/downloadtasks/AbstractDownloadTask.java

    r6033 r6040  
    5959                buf.append("<li>");
    6060                buf.append(XmlWriter.encode(pattern));
     61                buf.append("</li>");
    6162            }
    6263            buf.append("</ul>");
Note: See TracChangeset for help on using the changeset viewer.