Subject: [PATCH] 23111
---
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/actions/downloadtasks/AbstractDownloadTask.java b/src/org/openstreetmap/josm/actions/downloadtasks/AbstractDownloadTask.java
|
a
|
b
|
|
| 95 | 95 | return errorMessages; |
| 96 | 96 | } |
| 97 | 97 | |
| 98 | | @Override |
| 99 | | public String acceptsDocumentationSummary() { |
| 100 | | StringBuilder buff = new StringBuilder(128) |
| 101 | | .append("<tr><td>") |
| 102 | | .append(getTitle()) |
| 103 | | .append(":</td><td>"); |
| 104 | | String[] patterns = getPatterns(); |
| 105 | | if (patterns.length > 0) { |
| 106 | | buff.append("<ul>"); |
| 107 | | for (String pattern: patterns) { |
| 108 | | buff.append("<li>") |
| 109 | | .append(XmlWriter.encode(pattern)) |
| 110 | | .append("</li>"); |
| 111 | | } |
| 112 | | buff.append("</ul>"); |
| 113 | | } |
| 114 | | buff.append("</td></tr>"); |
| 115 | | return buff.toString(); |
| 116 | | } |
| 117 | 98 | |
| 118 | 99 | /** |
| 119 | 100 | * Determines if the given URL is accepted by {@link #getPatterns}. |
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/actions/downloadtasks/DownloadTask.java b/src/org/openstreetmap/josm/actions/downloadtasks/DownloadTask.java
|
a
|
b
|
|
| 10 | 10 | import org.openstreetmap.josm.data.Bounds; |
| 11 | 11 | import org.openstreetmap.josm.gui.progress.NullProgressMonitor; |
| 12 | 12 | import org.openstreetmap.josm.gui.progress.ProgressMonitor; |
| | 13 | import org.openstreetmap.josm.io.XmlWriter; |
| 13 | 14 | import org.openstreetmap.josm.tools.ExceptionUtil; |
| 14 | 15 | |
| 15 | 16 | /** |
| … |
… |
|
| 19 | 20 | |
| 20 | 21 | /** |
| 21 | 22 | * Asynchronously launches the download task for a given bounding box. |
| 22 | | * |
| | 23 | * <p> |
| 23 | 24 | * Set <code>progressMonitor</code> to null, if the task should create, open, and close a progress monitor. |
| 24 | 25 | * Set progressMonitor to {@link NullProgressMonitor#INSTANCE} if progress information is to |
| 25 | 26 | * be discarded. |
| 26 | | * |
| | 27 | * <p> |
| 27 | 28 | * You can wait for the asynchronous download task to finish by synchronizing on the returned |
| 28 | 29 | * {@link Future}, but make sure not to freeze up JOSM. Example: |
| 29 | 30 | * <pre> |
| … |
… |
|
| 59 | 60 | |
| 60 | 61 | /** |
| 61 | 62 | * Asynchronously launches the download task for a given bounding URL. |
| 62 | | * |
| | 63 | * <p> |
| 63 | 64 | * Set progressMonitor to null, if the task should create, open, and close a progress monitor. |
| 64 | 65 | * Set progressMonitor to {@link NullProgressMonitor#INSTANCE} if progress information is to |
| 65 | 66 | * be discarded. |
| … |
… |
|
| 92 | 93 | * @return The HTML documentation |
| 93 | 94 | * @since 6031 |
| 94 | 95 | */ |
| 95 | | String acceptsDocumentationSummary(); |
| | 96 | default String acceptsDocumentationSummary() { |
| | 97 | StringBuilder buff = new StringBuilder(128) |
| | 98 | .append("<tr><td>") |
| | 99 | .append(getTitle()) |
| | 100 | .append(":</td><td>"); |
| | 101 | String[] patterns = getPatterns(); |
| | 102 | if (patterns.length > 0) { |
| | 103 | buff.append("<ul>"); |
| | 104 | for (String pattern: patterns) { |
| | 105 | buff.append("<li>") |
| | 106 | .append(XmlWriter.encode(pattern)) |
| | 107 | .append("</li>"); |
| | 108 | } |
| | 109 | buff.append("</ul>"); |
| | 110 | } |
| | 111 | buff.append("</td></tr>"); |
| | 112 | return buff.toString(); |
| | 113 | } |
| 96 | 114 | |
| 97 | 115 | /** |
| 98 | 116 | * Returns human-readable description of the task |
| … |
… |
|
| 130 | 148 | } else if (o instanceof Exception) { |
| 131 | 149 | return ExceptionUtil.explainException((Exception) o).replace("<html>", "").replace("</html>", ""); |
| 132 | 150 | } else { |
| 133 | | return (String) null; |
| | 151 | return null; |
| 134 | 152 | } |
| 135 | 153 | }).filter(Objects::nonNull).collect(Collectors.toList()); |
| 136 | 154 | } |