From bcf3e3d6930fa85b4c772b48dbefa4e8850dc620 Mon Sep 17 00:00:00 2001 From: Jerome Pietri Date: Mon, 7 Oct 2019 15:33:30 +0200 Subject: [PATCH] fix(OSM changeset): add mapillary as source --- gradle.properties | 6 +++--- .../josm/plugins/mapillary/MapillaryLayer.java | 5 +++++ .../josm/plugins/mapillary/MapillaryLayerTest.java | 7 +++++++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/gradle.properties b/gradle.properties index 37904e635..23507229c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,12 +5,12 @@ plugin.description=Allows the user to work with pictures hosted at mapillary.com plugin.icon=images/mapillary-logo.svg plugin.link=https://wiki.openstreetmap.org/wiki/JOSM/Plugins/Mapillary # Minimum required JOSM version to run this plugin, choose the lowest version possible that is compatible. -# You can check if the plugin compiles against this version by executing `./gradlew minJosmVersionClasses`. -plugin.main.version=14760 +# You can check if the plugin compiles against this version by executing `./gradlew compileJava_minJosm`. +plugin.main.version=15371 # Version of JOSM against which the plugin is compiled # Please check, if the specified version is available for download from https://josm.openstreetmap.de/download/ . # If not, choose the next higher number that is available, or the gradle build will break. -plugin.compile.version=15238 +plugin.compile.version=15438 plugin.requires=apache-commons;apache-http # Character encoding of Gradle files diff --git a/src/main/java/org/openstreetmap/josm/plugins/mapillary/MapillaryLayer.java b/src/main/java/org/openstreetmap/josm/plugins/mapillary/MapillaryLayer.java index fc83b9e2c..2234f1ed6 100644 --- a/src/main/java/org/openstreetmap/josm/plugins/mapillary/MapillaryLayer.java +++ b/src/main/java/org/openstreetmap/josm/plugins/mapillary/MapillaryLayer.java @@ -412,6 +412,11 @@ public Icon getIcon() { return MapillaryPlugin.LOGO.setSize(ImageSizes.LAYER).get(); } + @Override + public String getChangesetSourceTag() { + return "mapillary"; + } + @Override public boolean isMergable(Layer other) { return false; diff --git a/test/unit/org/openstreetmap/josm/plugins/mapillary/MapillaryLayerTest.java b/test/unit/org/openstreetmap/josm/plugins/mapillary/MapillaryLayerTest.java index d80ecdb7d..44e7441e1 100644 --- a/test/unit/org/openstreetmap/josm/plugins/mapillary/MapillaryLayerTest.java +++ b/test/unit/org/openstreetmap/josm/plugins/mapillary/MapillaryLayerTest.java @@ -1,6 +1,7 @@ // License: GPL. For details, see LICENSE file. package org.openstreetmap.josm.plugins.mapillary; +import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; @@ -68,6 +69,12 @@ public void testGetInfoComponent() { assertTrue(((String) comp).length() >= 9); } + @Test + public void testGetChangesetSourceTag() { + String actualChangesetSourceTag = MapillaryLayer.getInstance().getChangesetSourceTag(); + assertEquals("OpenStreetmap changeset source for Mapillary layer should be 'mapillary'", "mapillary", actualChangesetSourceTag); + } + @Test public void testClearInstance() { MapillaryLayer.getInstance();