Ignore:
Timestamp:
2018-08-12T14:27:32+02:00 (16 months ago)
Author:
Don-vip
Message:

see #15229 - deprecate Main.main - new class OsmDataManager

Location:
trunk/src/org/openstreetmap/josm/data
Files:
2 added
4 edited

Legend:

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

    r14134 r14143  
    77import java.util.Objects;
    88
    9 import org.openstreetmap.josm.Main;
    109import org.openstreetmap.josm.command.Command;
    1110import org.openstreetmap.josm.data.osm.DataSet;
     11import org.openstreetmap.josm.data.osm.OsmDataManager;
    1212import org.openstreetmap.josm.spi.preferences.Config;
    1313import org.openstreetmap.josm.tools.CheckParameterUtil;
     
    291291        if (commands.isEmpty())
    292292            return;
    293         DataSet ds = Main.main.getEditDataSet();
     293        DataSet ds = OsmDataManager.getInstance().getEditDataSet();
    294294        if (ds != null) {
    295295            ds.beginUpdate();
  • trunk/src/org/openstreetmap/josm/data/osm/FilterModel.java

    r13434 r14143  
    9898     */
    9999    public void executeFilters() {
    100         DataSet ds = Main.main.getActiveDataSet();
     100        DataSet ds = OsmDataManager.getInstance().getActiveDataSet();
    101101        changed = false;
    102102        if (ds == null) {
     
    150150     */
    151151    public void executeFilters(Collection<? extends OsmPrimitive> primitives) {
    152         DataSet ds = Main.main.getEditDataSet();
     152        DataSet ds = OsmDataManager.getInstance().getEditDataSet();
    153153        if (ds == null)
    154154            return;
     
    209209     */
    210210    public void clearFilterFlags() {
    211         DataSet ds = Main.main.getEditDataSet();
     211        DataSet ds = OsmDataManager.getInstance().getEditDataSet();
    212212        if (ds != null) {
    213213            FilterWorker.clearFilterFlags(ds.allPrimitives());
  • trunk/src/org/openstreetmap/josm/data/validation/tests/UnconnectedWays.java

    r13942 r14143  
    1818import java.util.Set;
    1919
    20 import org.openstreetmap.josm.Main;
    2120import org.openstreetmap.josm.data.coor.EastNorth;
    2221import org.openstreetmap.josm.data.coor.LatLon;
     
    2423import org.openstreetmap.josm.data.osm.DataSet;
    2524import org.openstreetmap.josm.data.osm.Node;
     25import org.openstreetmap.josm.data.osm.OsmDataManager;
    2626import org.openstreetmap.josm.data.osm.OsmPrimitive;
    2727import org.openstreetmap.josm.data.osm.QuadBuckets;
     
    169169        mindist = Config.getPref().getDouble(PREFIX + ".node_way_distance", 10.0);
    170170        minmiddledist = Config.getPref().getDouble(PREFIX + ".way_way_distance", 0.0);
    171         DataSet dataSet = Main.main != null ? Main.main.getEditDataSet() : null;
     171        DataSet dataSet = OsmDataManager.getInstance().getEditDataSet();
    172172        dsArea = dataSet == null ? null : dataSet.getDataSourceArea();
    173173    }
  • trunk/src/org/openstreetmap/josm/data/validation/tests/UntaggedWay.java

    r12691 r14143  
    99import java.util.Set;
    1010
    11 import org.openstreetmap.josm.Main;
    1211import org.openstreetmap.josm.command.Command;
    1312import org.openstreetmap.josm.data.osm.DataSet;
     13import org.openstreetmap.josm.data.osm.OsmDataManager;
    1414import org.openstreetmap.josm.data.osm.OsmPrimitive;
    1515import org.openstreetmap.josm.data.osm.Relation;
     
    142142    public void startTest(ProgressMonitor monitor) {
    143143        super.startTest(monitor);
    144         DataSet ds = Main.main.getEditDataSet();
     144        DataSet ds = OsmDataManager.getInstance().getEditDataSet();
    145145        if (ds == null)
    146146            return;
Note: See TracChangeset for help on using the changeset viewer.