Ignore:
Timestamp:
2017-08-28T19:26:47+02:00 (2 years ago)
Author:
Don-vip
Message:

see #15182 - introduce Main.getEditDataSet to avoid unneeded GUI dependence in validator tests and tagging presets

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

Legend:

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

    r12649 r12691  
    3232import org.openstreetmap.josm.data.validation.Test;
    3333import org.openstreetmap.josm.data.validation.TestError;
    34 import org.openstreetmap.josm.gui.MainApplication;
    3534import org.openstreetmap.josm.gui.progress.ProgressMonitor;
    3635import org.openstreetmap.josm.tools.Logging;
     
    169168        mindist = Main.pref.getDouble(PREFIX + ".node_way_distance", 10.0);
    170169        minmiddledist = Main.pref.getDouble(PREFIX + ".way_way_distance", 0.0);
    171         DataSet dataSet = MainApplication.getLayerManager().getEditDataSet();
     170        DataSet dataSet = Main.main.getEditDataSet();
    172171        dsArea = dataSet == null ? null : dataSet.getDataSourceArea();
    173172    }
  • trunk/src/org/openstreetmap/josm/data/validation/tests/UntaggedWay.java

    r12636 r12691  
    99import java.util.Set;
    1010
     11import org.openstreetmap.josm.Main;
    1112import org.openstreetmap.josm.command.Command;
    1213import org.openstreetmap.josm.data.osm.DataSet;
     
    1819import org.openstreetmap.josm.data.validation.Test;
    1920import org.openstreetmap.josm.data.validation.TestError;
    20 import 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 = MainApplication.getLayerManager().getEditDataSet();
     144        DataSet ds = Main.main.getEditDataSet();
    145145        if (ds == null)
    146146            return;
Note: See TracChangeset for help on using the changeset viewer.