Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MainMenu.java
r17925 r18021 130 130 import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeEvent; 131 131 import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeListener; 132 import org.openstreetmap.josm.gui.layer.geoimage.WikimediaCommonsLoader; 132 import org.openstreetmap.josm.gui.layer.geoimage.WikimediaCommonsLoader.WikimediaCommonsLoadImagesAction; 133 133 import org.openstreetmap.josm.gui.mappaint.MapPaintMenu; 134 134 import org.openstreetmap.josm.gui.preferences.imagery.ImageryPreference; … … 749 749 add(fileMenu, searchNotes); 750 750 add(fileMenu, downloadNotesInView); 751 add(fileMenu, new WikimediaCommonsLoad er.Action());751 add(fileMenu, new WikimediaCommonsLoadImagesAction()); 752 752 add(fileMenu, downloadReferrers); 753 753 add(fileMenu, update); -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/WikimediaCommonsLoader.java
r17880 r18021 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.gui.layer.geoimage; 3 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 6 import java.awt.event.ActionEvent; 7 import java.io.IOException; 8 import java.util.ArrayList; 9 import java.util.List; 10 11 import javax.xml.parsers.ParserConfigurationException; 12 import javax.xml.xpath.XPathExpressionException; 3 13 4 14 import org.openstreetmap.josm.actions.JosmAction; … … 10 20 import org.openstreetmap.josm.tools.Mediawiki; 11 21 import org.xml.sax.SAXException; 12 13 import javax.xml.parsers.ParserConfigurationException;14 import javax.xml.xpath.XPathExpressionException;15 import java.awt.event.ActionEvent;16 import java.io.IOException;17 import java.util.ArrayList;18 import java.util.List;19 20 import static org.openstreetmap.josm.tools.I18n.tr;21 22 22 23 /** … … 59 60 } 60 61 61 public static class Action extends JosmAction { 62 public Action() { 62 /** 63 * Load images from Wikimedia Commons 64 * @since 18021 65 */ 66 public static class WikimediaCommonsLoadImagesAction extends JosmAction { 67 /** 68 * Constructs a new {@code WikimediaCommonsLoadImagesAction} 69 */ 70 public WikimediaCommonsLoadImagesAction() { 63 71 super(tr("Load images from Wikimedia Commons"), "wikimedia_commons", null, null, false); 64 72 } … … 75 83 } 76 84 } 77 78 85 } -
trunk/test/unit/org/openstreetmap/josm/gui/layer/geoimage/WikimediaCommonsLoaderTest.java
r17883 r18021 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.gui.layer.geoimage; 3 4 import com.github.tomakehurst.wiremock.WireMockServer;5 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;6 import org.junit.jupiter.api.Test;7 import org.junit.jupiter.api.extension.RegisterExtension;8 import org.openstreetmap.josm.data.Bounds;9 import org.openstreetmap.josm.testutils.JOSMTestRules;10 11 import java.net.URL;12 import java.util.List;13 3 14 4 import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; … … 17 7 import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.options; 18 8 import static org.junit.jupiter.api.Assertions.assertEquals; 9 10 import java.net.URL; 11 import java.util.List; 12 13 import org.junit.jupiter.api.Test; 14 import org.junit.jupiter.api.extension.RegisterExtension; 15 import org.openstreetmap.josm.data.Bounds; 16 import org.openstreetmap.josm.testutils.JOSMTestRules; 17 18 import com.github.tomakehurst.wiremock.WireMockServer; 19 20 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 19 21 20 22 /** … … 51 53 assertEquals(new URL("https://upload.wikimedia.org/wikipedia/commons/e/e8/ISS053-E-105875_-_View_of_Earth.jpg"), 52 54 image.getImageUrl()); 53 image.read(null); // load the image from commons.wikimedia.org54 55 } 55 56
Note:
See TracChangeset
for help on using the changeset viewer.