Ignore:
Timestamp:
2017-08-24T22:53:50+02:00 (2 years ago)
Author:
Don-vip
Message:

see #15182 - deprecate Main.getLayerManager(). Replacement: gui.MainApplication.getLayerManager()

Location:
trunk/src/org/openstreetmap/josm/data/validation
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java

    r12620 r12636  
    5858import org.openstreetmap.josm.data.validation.tests.WayConnectedToArea;
    5959import org.openstreetmap.josm.data.validation.tests.WronglyOrderedWays;
     60import org.openstreetmap.josm.gui.MainApplication;
    6061import org.openstreetmap.josm.gui.layer.ValidatorLayer;
    6162import org.openstreetmap.josm.gui.preferences.projection.ProjectionPreference;
     
    238239        if (errorLayer == null) {
    239240            errorLayer = new ValidatorLayer();
    240             Main.getLayerManager().addLayer(errorLayer);
     241            MainApplication.getLayerManager().addLayer(errorLayer);
    241242        }
    242243    }
  • trunk/src/org/openstreetmap/josm/data/validation/Test.java

    r12620 r12636  
    1515import javax.swing.JPanel;
    1616
    17 import org.openstreetmap.josm.Main;
    1817import org.openstreetmap.josm.actions.search.SearchCompiler.NotOutsideDataSourceArea;
    1918import org.openstreetmap.josm.command.Command;
     
    2423import org.openstreetmap.josm.data.osm.Way;
    2524import org.openstreetmap.josm.data.osm.visitor.AbstractVisitor;
     25import org.openstreetmap.josm.gui.MainApplication;
    2626import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
    2727import org.openstreetmap.josm.gui.progress.ProgressMonitor;
     
    331331        }
    332332        if (!primitivesToDelete.isEmpty()) {
    333             return DeleteCommand.delete(Main.getLayerManager().getEditLayer(), primitivesToDelete);
     333            return DeleteCommand.delete(MainApplication.getLayerManager().getEditLayer(), primitivesToDelete);
    334334        } else {
    335335            return null;
  • trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java

    r11913 r12636  
    3434import org.openstreetmap.josm.data.validation.Test;
    3535import org.openstreetmap.josm.data.validation.TestError;
     36import org.openstreetmap.josm.gui.MainApplication;
    3637import org.openstreetmap.josm.gui.progress.ProgressMonitor;
    3738import org.openstreetmap.josm.tools.MultiMap;
     
    333334
    334335            if (Command.checkOutlyingOrIncompleteOperation(nodes, Collections.singleton(target)) == Command.IS_OK)
    335                 return MergeNodesAction.mergeNodes(Main.getLayerManager().getEditLayer(), nodes, target);
     336                return MergeNodesAction.mergeNodes(MainApplication.getLayerManager().getEditLayer(), nodes, target);
    336337        }
    337338
  • trunk/src/org/openstreetmap/josm/data/validation/tests/UnconnectedWays.java

    r12620 r12636  
    3131import org.openstreetmap.josm.data.validation.Test;
    3232import org.openstreetmap.josm.data.validation.TestError;
     33import org.openstreetmap.josm.gui.MainApplication;
    3334import org.openstreetmap.josm.gui.preferences.validator.ValidatorPreference;
    3435import org.openstreetmap.josm.gui.progress.ProgressMonitor;
     
    168169        mindist = Main.pref.getDouble(PREFIX + ".node_way_distance", 10.0);
    169170        minmiddledist = Main.pref.getDouble(PREFIX + ".way_way_distance", 0.0);
    170         DataSet dataSet = Main.getLayerManager().getEditDataSet();
     171        DataSet dataSet = MainApplication.getLayerManager().getEditDataSet();
    171172        dsArea = dataSet == null ? null : dataSet.getDataSourceArea();
    172173    }
  • trunk/src/org/openstreetmap/josm/data/validation/tests/UntaggedWay.java

    r11913 r12636  
    99import java.util.Set;
    1010
    11 import org.openstreetmap.josm.Main;
    1211import org.openstreetmap.josm.command.Command;
    1312import org.openstreetmap.josm.data.osm.DataSet;
     
    1918import org.openstreetmap.josm.data.validation.Test;
    2019import org.openstreetmap.josm.data.validation.TestError;
     20import org.openstreetmap.josm.gui.MainApplication;
    2121import org.openstreetmap.josm.gui.progress.ProgressMonitor;
    2222
     
    142142    public void startTest(ProgressMonitor monitor) {
    143143        super.startTest(monitor);
    144         DataSet ds = Main.getLayerManager().getEditDataSet();
     144        DataSet ds = MainApplication.getLayerManager().getEditDataSet();
    145145        if (ds == null)
    146146            return;
Note: See TracChangeset for help on using the changeset viewer.