Changeset 34325 in osm for applications/editors/josm


Ignore:
Timestamp:
2018-06-19T19:14:05+02:00 (6 years ago)
Author:
donvip
Message:

fix warnings

Location:
applications/editors/josm/plugins/MicrosoftStreetside
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/StreetsideImage.java

    r34317 r34325  
    6565   * Main constructor of the class StreetsideImage
    6666   *
    67    * @param key    The unique identifier of the image.
     67   * @param id     The unique identifier of the image.
    6868   * @param latLon The latitude and longitude where it is positioned.
    69    * @param cd     The direction of the images in degrees, meaning 0 north.
    70    */
    71 
     69   * @param he     The direction of the images in degrees, meaning 0 north.
     70   */
    7271  public StreetsideImage(String id, LatLon latLon, double he) {
    7372    super(id, latLon, he);
     
    205204
    206205  /**
    207    * @param pi the pi to set
     206   * @param pitch the pi to set
    208207   */
    209208  public void setPi(double pitch) {
     
    219218
    220219  /**
    221    * @param burringl the burringl to set
     220   * @param blurring the blurring to set
    222221   */
    223222  public void setBl(String blurring) {
  • applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/StreetsideImportedImage.java

    r34317 r34325  
    3434   * Using when the EXIF tags doesn't contain that info.
    3535   *
     36   * @param id  The Streetside image id
    3637   * @param latLon  The latitude and longitude where the picture was taken.
    37    * @param cd  Direction of the picture (0 means north).
     38   * @param ca  Direction of the picture (0 means north).
    3839   * @param file  The file containing the picture.
    3940   */
     
    4546   * Main constructor of the class.
    4647   *
     48   * @param id  The Streetside image id
    4749   * @param latLon  Latitude and Longitude where the picture was taken.
    48    * @param cd  Direction of the picture (0 means north),
     50   * @param ca  Direction of the picture (0 means north),
    4951   * @param file  The file containing the picture.
    5052   * @param datetimeOriginal  The date the picture was taken.
  • applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/StreetsideLayer.java

    r34317 r34325  
    218218           * Layer.
    219219           *
    220            * @return The {@link MapillaryData} object that stores the database.
     220           * @return The {@link StreetsideData} object that stores the database.
    221221           */
    222222          public StreetsideLocationChangeset getLocationChangeset() {
     
    333333        }
    334334
    335         /**
     335        /*
    336336         * Draws an image marker onto the given Graphics context.
    337337         * @param g the Graphics context
     
    524524        }
    525525
    526         /**
     526        /*
    527527         * Returns the closest images belonging to a different sequence and
    528528         * different from the specified target image.
  • applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/StreetsidePlugin.java

    r34317 r34325  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.plugins.streetside;
    3 
    4 import java.io.IOException;
    53
    64import org.openstreetmap.josm.Main;
     
    5957   * @param info
    6058   *          Required information of the plugin. Obtained from the jar file.
    61    * @throws IOException if the streetside cache directory is not found
    6259   */
    63   public StreetsidePlugin(PluginInformation info) /*throws IOException*/ {
     60  public StreetsidePlugin(PluginInformation info) {
    6461    super(info);
    6562
  • applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/StreetsideSequence.java

    r34317 r34325  
    3737  private List<StreetsideAbstractImage> images;
    3838
    39   /**
    40    * Unique identifier. Used only for {@link StreetsideImage} sequences.
    41    */
    42 
    43   /**
    44    * @param string
    45    * @param string2
    46    * @param capturedAt2
    47    */
    4839  public StreetsideSequence(String id, Long ca) {
    4940        this.id = id;
     
    5243  }
    5344
    54   /**
    55    * @param string
    56    * @param la
    57    * @param lo
    58    */
    5945  public StreetsideSequence(String id, double la, double lo) {
    6046    this.id = id;
     
    6551
    6652  /**
    67    *    No argument constructor for StreetsideSequence - necessary for JSON serialization
     53   * No argument constructor for StreetsideSequence - necessary for JSON serialization
    6854   */
    6955  public StreetsideSequence() {
     
    8571}
    8672
    87 /**
     73  /**
    8874   * Adds a new {@link StreetsideAbstractImage} object to the database.
    8975   *
  • applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/cache/CacheUtils.java

    r34317 r34325  
    5353* image. Does nothing if it is already in cache.
    5454*
    55 * @param img
     55* @param cm
    5656*          The image whose picture is going to be downloaded.
    5757*/
  • applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/cubemap/CubemapUtils.java

    r34317 r34325  
    1717                    SIXTEEN(16);
    1818
    19                     private int value;
     19                    private final int value;
    2020                    private static Map<Integer, CubefaceType> map = new HashMap<>();
    2121
  • applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/cubemap/ITileDownloadingTaskListener.java

    r34317 r34325  
    33
    44/**
    5 * Interface for listeners of the class {@link StreetsideData}.
     5* Interface for listeners of the class {@link org.openstreetmap.josm.plugins.streetside.StreetsideData}.
    66*
    77* @author renerr18
     
    1010public interface ITileDownloadingTaskListener {
    1111
    12 /**
    13 * Fired when a cubemap tile image is downloaded by a download worker.
    14 *
    15 */
    16 void tileAdded(String imageId);
     12 /**
     13 * Fired when a cubemap tile image is downloaded by a download worker.
     14 * @param imageId image id
     15 */
     16 void tileAdded(String imageId);
    1717}
  • applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/cubemap/TileDownloadingTask.java

    r34317 r34325  
    5656
    5757        /**
    58          * @param tileId the tileId to set
     58         * @param id the tileId to set
    5959         */
    6060        public void setId(String id) {
  • applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/gui/imageinfo/ImageInfoPanel.java

    r34317 r34325  
    1818import org.apache.commons.logging.Log;
    1919import org.apache.commons.logging.LogFactory;
    20 import org.openstreetmap.josm.data.SelectionChangedListener;
    21 import org.openstreetmap.josm.data.osm.DataSet;
     20import org.openstreetmap.josm.data.osm.DataSelectionListener;
    2221import org.openstreetmap.josm.data.osm.OsmPrimitive;
    2322import org.openstreetmap.josm.data.osm.Tag;
     23import org.openstreetmap.josm.data.osm.event.SelectionEventManager;
    2424import org.openstreetmap.josm.data.preferences.AbstractProperty.ValueChangeListener;
    2525import org.openstreetmap.josm.gui.dialogs.ToggleDialog;
     
    3434import org.openstreetmap.josm.tools.I18n;
    3535
    36 public final class ImageInfoPanel extends ToggleDialog implements StreetsideDataListener, SelectionChangedListener {
     36public final class ImageInfoPanel extends ToggleDialog implements StreetsideDataListener, DataSelectionListener {
    3737  private static final long serialVersionUID = 4141847503072417190L;
    3838  private static final Log L = LogFactory.getLog(ImageInfoPanel.class);
     
    5959      150
    6060    );
    61     DataSet.addSelectionListener(this);
     61    SelectionEventManager.getInstance().addSelectionListener(this);
    6262
    6363    //numDetectionsLabel = new JLabel();
     
    232232   */
    233233  @Override
    234   public synchronized void selectionChanged(final Collection<? extends OsmPrimitive> sel) {
     234  public synchronized void selectionChanged(final SelectionChangeEvent event) {
     235    final Collection<? extends OsmPrimitive> sel = event.getSelection();
    235236    L.debug(String.format("Selection changed. %d primitives are selected.", sel == null ? 0 : sel.size()));
    236237    addStreetsideTagAction.setTarget(sel != null && sel.size() == 1 ? sel.iterator().next() : null);
  • applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/gui/imageinfo/StreetsideViewerPanel.java

    r34317 r34325  
    33
    44import java.awt.BorderLayout;
    5 import java.util.Collection;
    65
    76import javax.swing.JCheckBox;
     
    98import javax.swing.SwingUtilities;
    109
    11 import org.openstreetmap.josm.data.SelectionChangedListener;
    12 import org.openstreetmap.josm.data.osm.DataSet;
    13 import org.openstreetmap.josm.data.osm.OsmPrimitive;
    1410import org.openstreetmap.josm.data.preferences.AbstractProperty.ValueChangeListener;
    1511import org.openstreetmap.josm.plugins.streetside.StreetsideAbstractImage;
     
    2824
    2925public final class StreetsideViewerPanel extends JPanel
    30                 implements StreetsideDataListener, SelectionChangedListener {
     26                implements StreetsideDataListener {
    3127
    3228        private static final long serialVersionUID = 4141847503072417190L;
     
    5652
    5753        private void initializeAndStartGUI() {
    58 
    59                 DataSet.addSelectionListener(this);
    6054
    6155                threeSixtyDegreeViewerPanel = new ThreeSixtyDegreeViewerPanel();
     
    150144        }
    151145
    152         /*
    153          * (non-Javadoc)
    154          *
    155          * @see
    156          * org.openstreetmap.josm.data.SelectionChangedListener#selectionChanged(java.
    157          * util.Collection)
    158          */
    159         @Override
    160         public synchronized void selectionChanged(final Collection<? extends OsmPrimitive> sel) {
    161                 Logging.debug(String.format("Selection changed. %d primitives are selected.", sel == null ? 0 : sel.size()));
    162         }
    163 
    164146        public CubemapBox getCubemapBox() {
    165147                return threeSixtyDegreeViewerPanel.getCubemapBox();
  • applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/history/commands/CommandTurn.java

    r34317 r34325  
    2323   * @param images
    2424   *          Set of images that is turned.
    25    * @param cd
     25   * @param ca
    2626   *          How much the images turn.
    2727   */
  • applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/io/download/StreetsideDownloader.java

    r34317 r34325  
    198198   * lots of Streetside images are going to be downloaded, slowing down the
    199199   * program too much. A notification is shown when the download has stopped or continued.
     200   * @param area area to check
     201   * @return {@code true} if the area is too big
    200202   */
    201203  private static boolean isAreaTooBig(final double area) {
  • applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/mode/package-info.java

    r34317 r34325  
    55 * Currently there are two of them:
    66 * <ul>
    7  *  <li><strong>{@link org.openstreetmap.josm.plugins.mapillary.mode.JoinMode}</strong> for joining pictures to make sequences</li>
    8  *  <li><strong>{@link org.openstreetmap.josm.plugins.mapillary.mode.SelectMode}</strong> for selecting pictures in the layer</li>
     7 *  <li><strong>{@link org.openstreetmap.josm.plugins.streetside.mode.JoinMode JoinMode}</strong> for joining pictures to make sequences</li>
     8 *  <li><strong>{@link org.openstreetmap.josm.plugins.streetside.mode.SelectMode SelectMode}</strong> for selecting pictures in the layer</li>
    99 * </ul>
    1010 */
  • applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/utils/StreetsideProperties.java

    r34317 r34325  
    99import org.openstreetmap.josm.data.preferences.NamedColorProperty;
    1010import org.openstreetmap.josm.data.preferences.StringProperty;
    11 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    1211import org.openstreetmap.josm.plugins.streetside.gui.imageinfo.ImageInfoPanel;
     12import org.openstreetmap.josm.plugins.streetside.gui.imageinfo.StreetsideViewerPanel;
    1313import org.openstreetmap.josm.plugins.streetside.io.download.StreetsideDownloader;
    1414
     
    3737
    3838  /**
    39    * @see OsmDataLayer#PROPERTY_BACKGROUND_COLOR
     39   * See {@code OsmDataLayer#PROPERTY_BACKGROUND_COLOR}
    4040   */
    4141  public static final NamedColorProperty BACKGROUND = new NamedColorProperty("background", Color.BLACK);
    4242  /**
    43    * @see OsmDataLayer#PROPERTY_OUTSIDE_COLOR
     43   * See {@code OsmDataLayer#PROPERTY_OUTSIDE_COLOR}
    4444   */
    4545  public static final NamedColorProperty OUTSIDE_DOWNLOADED_AREA = new NamedColorProperty("outside downloaded area", Color.YELLOW);
  • applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/utils/StreetsideURL.java

    r34317 r34325  
    193193                /**
    194194                 * Gives you the URL for the blur editor of the image with the given key.
    195                  * @param key the key of the image for which you want to open the blur editor
     195                 * @param id the key of the image for which you want to open the blur editor
    196196                 * @return the URL of the blur editor
    197197                 * @throws IllegalArgumentException if the image key is <code>null</code>
     
    334334        }
    335335
    336         /**
    337          *
    338          */
    339336        static String queryByIdString(Map<String, String> parts) {
    340337                final StringBuilder ret = new StringBuilder("?id=");
  • applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/utils/api/JsonSequencesDecoder.java

    r34317 r34325  
    2828   * Parses a given {@link JsonObject} as a GeoJSON Feature into a {@link StreetsideSequence}.
    2929   * @param json the {@link JsonObject} to be parsed
    30    * @return a {@link Streetsideequence} that is parsed from the given {@link JsonObject}. If mandatory information is
     30   * @return a {@link StreetsideSequence} that is parsed from the given {@link JsonObject}. If mandatory information is
    3131   *         missing from the JSON or it's not meeting the expecting format in another way, <code>null</code> will be
    3232   *         returned.
     
    7272   * Converts a {@link JsonArray} to a java array.
    7373   * The conversion from {@link JsonValue} to a java type is done by the supplied function.
     74   * @param <T> object type
    7475   * @param array the array to be converted
    7576   * @param decodeValueFunction the function used for conversion from {@link JsonValue} to the desired type.
     
    9899   * For example this is used to convert the `image_keys` JSON array to a String[] array or the `cas` JSON array to a
    99100   * Double[] array.
     101   * @param <T> object type
    100102   * @param json the JSON object representing the `properties` of a sequence
    101103   * @param key the key, which identifies the desired array inside the `coordinateProperties` object to be converted
  • applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/utils/api/JsonStreetsideSequencesDecoder.java

    r34317 r34325  
    7070
    7171  /**
    72    * Parses a given {@link JsonObject} as a GeoJSON Feature into a {@link StreetsideSequence}.
    73    * @param json the {@link JsonObject} to be parsed
     72   * Parses a given {@link StreetsideImage} as a GeoJSON Feature into a {@link StreetsideSequence}.
     73   * @param image the {@link StreetsideImage} to be parsed
    7474   * @return a {@link StreetsideSequence} that is parsed from the given {@link JsonObject}. If mandatory information is
    7575   *         missing from the JSON or it's not meeting the expecting format in another way, <code>null</code> will be
     
    123123   * Converts a {@link JsonArray} to a java array.
    124124   * The conversion from {@link JsonValue} to a java type is done by the supplied function.
     125   * @param <T> object type
    125126   * @param array the array to be converted
    126127   * @param decodeValueFunction the function used for conversion from {@link JsonValue} to the desired type.
     
    149150   * For example this is used to convert the `image_keys` JSON array to a String[] array or the `cas` JSON array to a
    150151   * Double[] array.
     152   * @param <T> object type
    151153   * @param json the JSON object representing the `properties` of a sequence
    152154   * @param key the key, which identifies the desired array inside the `coordinateProperties` object to be converted
  • applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/io/download/SequenceDownloadRunnableTest.java

    r34317 r34325  
    1010
    1111import org.junit.AfterClass;
    12 import org.junit.Before;
     12import org.junit.Ignore;
    1313import org.junit.Rule;
    1414import org.junit.Test;
     
    1818import org.openstreetmap.josm.plugins.streetside.StreetsideLayer;
    1919import org.openstreetmap.josm.plugins.streetside.utils.StreetsideProperties;
    20 import org.openstreetmap.josm.plugins.streetside.utils.TestUtil;
    2120import org.openstreetmap.josm.plugins.streetside.utils.TestUtil.StreetsideTestRules;
    2221import org.openstreetmap.josm.testutils.JOSMTestRules;
     
    3837  }
    3938
    40   // TODO: fox!
    41   //@Test
     39  @Test
     40  @Ignore // TODO: fox!
    4241  public void testRun1() throws IllegalArgumentException, IllegalAccessException {
    4342    testNumberOfDecodedImages(4, SEARCH_SEQUENCES_URL_GEN, new Bounds(7.246497, 16.432955, 7.249027, 16.432976));
    4443  }
    4544
    46   //TODO: fox!
    47   //@Test
     45  @Test
     46  @Ignore // TODO: fox!
    4847  public void testRun2() throws IllegalArgumentException, IllegalAccessException {
    4948    testNumberOfDecodedImages(0, SEARCH_SEQUENCES_URL_GEN, new Bounds(0, 0, 0, 0));
    5049  }
    5150
    52   //TODO: fox!
    53  //@Test
     51  @Test
     52  @Ignore // TODO: fox!
    5453  public void testRun3() throws IllegalArgumentException, IllegalAccessException {
    5554    testNumberOfDecodedImages(0, b -> {
     
    5857  }
    5958
    60   //TODO: fox!
    61  //@Test
     59  @Test
     60  @Ignore // TODO: fox!
    6261  public void testRun4() throws IllegalArgumentException, IllegalAccessException {
    6362    StreetsideProperties.CUT_OFF_SEQUENCES_AT_BOUNDS.put(true);
     
    6564  }
    6665
    67   //TODO: fox!
    68  //@Test
     66  @Test
     67  @Ignore // TODO: fox!
    6968  public void testRun5() throws IllegalArgumentException, IllegalAccessException {
    7069    StreetsideProperties.CUT_OFF_SEQUENCES_AT_BOUNDS.put(true);
Note: See TracChangeset for help on using the changeset viewer.