Changeset 11904 in josm for trunk


Ignore:
Timestamp:
2017-04-14T21:06:41+02:00 (7 years ago)
Author:
Don-vip
Message:

sonar - squid:S2301 - Public methods should not contain selector arguments

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

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/Main.java

    r11898 r11904  
    13021302
    13031303    /**
    1304      * Registers a new {@code MapFrameListener} that will be notified of MapFrame changes
     1304     * Registers a new {@code MapFrameListener} that will be notified of MapFrame changes.
     1305     * <p>
     1306     * It will fire an initial mapFrameInitialized event when the MapFrame is present.
     1307     * Otherwise will only fire when the MapFrame is created or destroyed.
    13051308     * @param listener The MapFrameListener
    1306      * @param fireWhenMapViewPresent If true, will fire an initial mapFrameInitialized event
    1307      * when the MapFrame is present. Otherwise will only fire when the MapFrame is created
    1308      * or destroyed.
    13091309     * @return {@code true} if the listeners collection changed as a result of the call
    1310      */
    1311     public static boolean addMapFrameListener(MapFrameListener listener, boolean fireWhenMapViewPresent) {
    1312         if (fireWhenMapViewPresent) {
    1313             return mainPanel.addAndFireMapFrameListener(listener);
    1314         } else {
    1315             return mainPanel.addMapFrameListener(listener);
    1316         }
     1310     * @see #addMapFrameListener
     1311     * @since 11904
     1312     */
     1313    public static boolean addAndFireMapFrameListener(MapFrameListener listener) {
     1314        return mainPanel.addAndFireMapFrameListener(listener);
    13171315    }
    13181316
     
    13211319     * @param listener The MapFrameListener
    13221320     * @return {@code true} if the listeners collection changed as a result of the call
     1321     * @see #addAndFireMapFrameListener
    13231322     * @since 5957
    13241323     */
  • trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java

    r11848 r11904  
    281281    }
    282282
     283    /**
     284     * Returns all ClassLoaders whose resource should be searched.
     285     * @return all ClassLoaders whose resource should be searched
     286     */
    283287    public static Collection<ClassLoader> getResourceClassLoaders() {
    284288        return Collections.unmodifiableCollection(sources);
     
    716720                PluginProxy pluginProxy = plugin.load(klass);
    717721                pluginList.add(pluginProxy);
    718                 Main.addMapFrameListener(pluginProxy, true);
     722                Main.addAndFireMapFrameListener(pluginProxy);
    719723            }
    720724            msg = null;
Note: See TracChangeset for help on using the changeset viewer.