Ignore:
Timestamp:
2017-04-10T23:49:54+02:00 (7 years ago)
Author:
Don-vip
Message:

add basic unit tests for MergeLayerAction + improve javadoc, code cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java

    r11881 r11885  
    4444import org.openstreetmap.josm.actions.MergeLayerAction;
    4545import org.openstreetmap.josm.data.preferences.AbstractProperty;
    46 import org.openstreetmap.josm.gui.MapFrame;
    4746import org.openstreetmap.josm.gui.MapView;
    4847import org.openstreetmap.josm.gui.SideButton;
     
    9089
    9190    /**
    92      * Creates the instance of the dialog. It's connected to the map frame <code>mapFrame</code>
     91     * Creates the instance of the dialog. It's connected to the layer manager
    9392     *
    94      * @param mapFrame the map frame
    95      */
    96     public static void createInstance(MapFrame mapFrame) {
     93     * @param layerManager the layer manager
     94     * @since 11885 (signature)
     95     */
     96    public static void createInstance(MainLayerManager layerManager) {
    9797        if (instance != null)
    9898            throw new IllegalStateException("Dialog was already created");
    99         instance = new LayerListDialog(mapFrame);
     99        instance = new LayerListDialog(layerManager);
    100100    }
    101101
     
    105105     * @return the instance of the dialog
    106106     * @throws IllegalStateException if the dialog is not created yet
    107      * @see #createInstance(MapFrame)
     107     * @see #createInstance(MainLayerManager)
    108108     */
    109109    public static LayerListDialog getInstance() {
     
    164164
    165165    /**
    166      * Creates a layer list and attach it to the given mapView.
    167      * @param mapFrame map frame
    168      */
    169     protected LayerListDialog(MapFrame mapFrame) {
    170         this(mapFrame.mapView.getLayerManager());
    171     }
    172 
    173     /**
    174      * Creates a layer list and attach it to the given mapView.
     166     * Creates a layer list and attach it to the given layer manager.
    175167     * @param layerManager The layer manager this list is for
    176168     * @since 10467
Note: See TracChangeset for help on using the changeset viewer.