Ignore:
Timestamp:
2015-08-21T22:43:38+02:00 (9 years ago)
Author:
nokutu
Message:

Change build.gradle to use latest JOSM version and fixed code issues related to a recent JOSM upload.

Location:
applications/editors/josm/plugins/mapillary
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/mapillary/build.gradle

    r31446 r31518  
    2929  // The JOSM-version can be specified as "latest", "tested" or "snapshot-1234" (replace 1234 by the desired version number).
    3030  // For revisions older than the last ~60 versions, also append "Archiv" to the repository URL above
    31   compile 'org.openstreetmap.josm:josm:tested'
     31  compile 'org.openstreetmap.josm:josm:latest'
    3232  compile 'org.apache.commons:commons-imaging:1.0-SNAPSHOT'
    3333
  • applications/editors/josm/plugins/mapillary/build.xml

    r31516 r31518  
    55    <property name="plugin.main.version" value="8433"/>
    66    <property name="plugin.canloadatruntime" value="true"/>
    7     <property name="plugin.version" value="1.0"/>
     7    <property name="plugin.version" value="1.0.1"/>
    88    <property name="plugin.author" value="nokutu &lt;nokutu@openmailbox.org&gt;"/>
    99    <property name="plugin.class" value="org.openstreetmap.josm.plugins.mapillary.MapillaryPlugin"/>
  • applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/cache/CacheUtils.java

    r31501 r31518  
    11package org.openstreetmap.josm.plugins.mapillary.cache;
    22
     3import java.io.IOException;
     4
     5import org.openstreetmap.josm.Main;
    36import org.openstreetmap.josm.data.cache.CacheEntry;
    47import org.openstreetmap.josm.data.cache.CacheEntryAttributes;
     
    4144   * in cache.
    4245   *
    43    * @param img The image to be downloaded.
     46   * @param img
     47   *          The image to be downloaded.
    4448   * @param pic
    4549   *          The picture type to be downloaded (full quality, thumbnail or
     
    5155        if (new MapillaryCache(img.getKey(), MapillaryCache.Type.THUMBNAIL)
    5256            .get() == null)
    53           new MapillaryCache(img.getKey(), MapillaryCache.Type.THUMBNAIL)
    54               .submit(IGNORE_DOWNLOAD, false);
     57          submit(img.getKey(), MapillaryCache.Type.THUMBNAIL, IGNORE_DOWNLOAD);
    5558        if (new MapillaryCache(img.getKey(), MapillaryCache.Type.FULL_IMAGE)
    5659            .get() == null)
    57           new MapillaryCache(img.getKey(), MapillaryCache.Type.FULL_IMAGE)
    58               .submit(IGNORE_DOWNLOAD, false);
     60          submit(img.getKey(), MapillaryCache.Type.FULL_IMAGE, IGNORE_DOWNLOAD);
    5961        break;
    6062      case THUMBNAIL:
    61         new MapillaryCache(img.getKey(), MapillaryCache.Type.THUMBNAIL).submit(
    62             IGNORE_DOWNLOAD, false);
     63        submit(img.getKey(), MapillaryCache.Type.THUMBNAIL, IGNORE_DOWNLOAD);
    6364        break;
    6465      case FULL_IMAGE:
    65         new MapillaryCache(img.getKey(), MapillaryCache.Type.FULL_IMAGE)
    66             .submit(IGNORE_DOWNLOAD, false);
     66        submit(img.getKey(), MapillaryCache.Type.FULL_IMAGE, IGNORE_DOWNLOAD);
    6767        break;
     68    }
     69  }
     70
     71  /**
     72   * Requests the picture with the given key and quality and uses the given
     73   * listener.
     74   *
     75   * @param key
     76   *          The key of the picture to be requested.
     77   * @param type
     78   *          The quality of the picture to be requested.
     79   * @param lis
     80   *          The listener that is going to receive the picture.
     81   */
     82  public static void submit(String key, MapillaryCache.Type type,
     83      ICachedLoaderListener lis) {
     84    try {
     85      new MapillaryCache(key, type).submit(lis, false);
     86    } catch (IOException e) {
     87      Main.error(e);
    6888    }
    6989  }
  • applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryMainDialog.java

    r31513 r31518  
    244244        this.thumbnailCache = new MapillaryCache(mapillaryImage.getKey(),
    245245            MapillaryCache.Type.THUMBNAIL);
    246         this.thumbnailCache.submit(this, false);
     246        try {
     247          this.thumbnailCache.submit(this, false);
     248        } catch (IOException e) {
     249          Main.error(e);
     250        }
    247251
    248252        // Downloads the full resolution image.
     
    252256          this.imageCache = new MapillaryCache(mapillaryImage.getKey(),
    253257              MapillaryCache.Type.FULL_IMAGE);
    254           this.imageCache.submit(this, false);
     258          try {
     259            this.imageCache.submit(this, false);
     260          } catch (IOException e) {
     261            Main.error(e);
     262          }
    255263        }
    256264      } else if (this.image instanceof MapillaryImportedImage) {
  • applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/io/export/MapillaryExportDownloadThread.java

    r31515 r31518  
    1414import org.openstreetmap.josm.plugins.mapillary.MapillaryAbstractImage;
    1515import org.openstreetmap.josm.plugins.mapillary.MapillaryImage;
     16import org.openstreetmap.josm.plugins.mapillary.cache.CacheUtils;
    1617import org.openstreetmap.josm.plugins.mapillary.cache.MapillaryCache;
    1718
     
    5455  @Override
    5556  public void run() {
    56     new MapillaryCache(this.image.getKey(), MapillaryCache.Type.FULL_IMAGE)
    57         .submit(this, false);
     57    CacheUtils.submit(this.image.getKey(), MapillaryCache.Type.FULL_IMAGE, this);
    5858  }
    5959
Note: See TracChangeset for help on using the changeset viewer.