Skip to content

Commit

Permalink
See #23111: Use the common acceptsDocumentationSummary `DownloadTas…
Browse files Browse the repository at this point in the history
…k` method definition

git-svn-id: https://josm.openstreetmap.de/osmsvn/applications/editors/josm/plugins@36144 b9d5c4c9-76e1-0310-9c85-f3177eceb1e4
  • Loading branch information
taylor.smock committed Sep 18, 2023
1 parent a28d1aa commit 3061fe2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 23 deletions.
2 changes: 1 addition & 1 deletion pmtiles/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<!-- enter the SVN commit message -->
<property name="commit.message" value="Commit message"/>
<!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
<property name="plugin.main.version" value="10580"/>
<property name="plugin.main.version" value="18830"/>

<!-- Configure these properties (replace "..." accordingly).
See https://josm.openstreetmap.de/wiki/DevelopersGuide/DevelopingPlugins
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import org.openstreetmap.josm.data.Bounds;
import org.openstreetmap.josm.gui.MainApplication;
import org.openstreetmap.josm.gui.progress.ProgressMonitor;
import org.openstreetmap.josm.io.XmlWriter;
import org.openstreetmap.josm.plugins.pmtiles.data.imagery.PMTilesImageryInfo;
import org.openstreetmap.josm.plugins.pmtiles.gui.layers.PMTilesImageLayer;
import org.openstreetmap.josm.plugins.pmtiles.gui.layers.PMTilesMVTLayer;
Expand Down Expand Up @@ -72,27 +71,6 @@ public boolean acceptsUrl(String url, boolean isRemotecontrol) {
return url.endsWith(".pmtiles");
}

@Override
public String acceptsDocumentationSummary() {
// I think this should be a "default" implementation in DownloadTask
StringBuilder buff = new StringBuilder(128)
.append("<tr><td>")
.append(getTitle())
.append(":</td><td>");
String[] patterns = getPatterns();
if (patterns.length > 0) {
buff.append("<ul>");
for (String pattern: patterns) {
buff.append("<li>")
.append(XmlWriter.encode(pattern))
.append("</li>");
}
buff.append("</ul>");
}
buff.append("</td></tr>");
return buff.toString();
}

@Override
public String getTitle() {
return tr("Add PMTiles layer");
Expand Down

0 comments on commit 3061fe2

Please sign in to comment.