Changeset 10050 in josm for trunk/src/org


Ignore:
Timestamp:
2016-03-26T20:42:27+01:00 (9 years ago)
Author:
Don-vip
Message:

add more unit tests

Location:
trunk/src/org/openstreetmap/josm
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java

    r10031 r10050  
    191191    @Override
    192192    public Color getColor(boolean ignoreCustom) {
    193         String name = getName();
    194         return Main.pref.getColor(marktr("gps marker"), name != null ? "layer "+name : null, DEFAULT_COLOR);
     193        return Main.pref.getColor(marktr("gps marker"), "layer "+getName(), DEFAULT_COLOR);
    195194    }
    196195
     
    223222    @Override
    224223    public String getToolTipText() {
    225         return data.size()+' '+trn("marker", "markers", data.size());
     224        return data.size()+" "+trn("marker", "markers", data.size());
    226225    }
    227226
  • trunk/src/org/openstreetmap/josm/plugins/PluginException.java

    r9983 r10050  
    1010 *
    1111 * @author Immanuel.Scholz
     12 * @since 149
    1213 */
    1314public class PluginException extends Exception {
     15
     16    /** Plugin proxy, can be null */
    1417    public final transient PluginProxy plugin;
    1518
     19    /**
     20     * Constructs a new {@code PluginException} with the specified plugin and cause.
     21     * @param plugin plugin proxy
     22     * @param name plugin name
     23     * @param cause cause the cause (which is saved for later retrieval by the {@link #getCause()} method).
     24     */
    1625    public PluginException(PluginProxy plugin, String name, Throwable cause) {
    1726        super(tr("An error occurred in plugin {0}", name), cause);
     
    1928    }
    2029
     30    /**
     31     * Constructs a new {@code PluginException} with the specified detail message.
     32     * @param message message the detail message (which is saved for later retrieval by the {@link #getMessage()} method).
     33     */
    2134    public PluginException(String message) {
    2235        super(message);
     
    2437    }
    2538
     39    /**
     40     * Constructs a new {@code PluginException} with the specified plugin name, cause and a detail message of
     41     * <tt>(cause==null ? null : cause.toString())</tt> (which typically contains the class and detail message of <tt>cause</tt>).
     42     * @param name plugin name
     43     * @param cause cause the cause (which is saved for later retrieval by the {@link #getCause()} method).
     44     */
    2645    public PluginException(String name, Throwable cause) {
    2746        super(tr("An error occurred in plugin {0}", name), cause);
  • trunk/src/org/openstreetmap/josm/plugins/PluginListParseException.java

    r3083 r10050  
    22package org.openstreetmap.josm.plugins;
    33
     4/**
     5 * Exception thrown during plugin list parsing.
     6 * @since 2817
     7 */
    48public class PluginListParseException extends Exception {
    5     public PluginListParseException() {
    6         super();
     9
     10    /**
     11     * Constructs a new {@code PluginListParseException} with the specified detail message and cause.
     12     * @param message message the detail message (which is saved for later retrieval by the {@link #getMessage()} method).
     13     * @param cause cause the cause (which is saved for later retrieval by the {@link #getCause()} method).
     14     */
     15    public PluginListParseException(String message, Throwable cause) {
     16        super(message, cause);
    717    }
    818
    9     public PluginListParseException(String arg0, Throwable arg1) {
    10         super(arg0, arg1);
    11     }
    12 
    13     public PluginListParseException(String arg0) {
    14         super(arg0);
    15     }
    16 
    17     public PluginListParseException(Throwable arg0) {
    18         super(arg0);
     19    /**
     20     * Constructs a new {@code PluginListParseException} with the specified cause and a detail message of
     21     * <tt>(cause==null ? null : cause.toString())</tt> (which typically contains the class and detail message of <tt>cause</tt>).
     22     * @param cause cause the cause (which is saved for later retrieval by the {@link #getCause()} method).
     23     */
     24    public PluginListParseException(Throwable cause) {
     25        super(cause);
    1926    }
    2027}
Note: See TracChangeset for help on using the changeset viewer.