Changeset 14253 in josm


Ignore:
Timestamp:
2018-09-16T02:25:19+02:00 (3 months ago)
Author:
Don-vip
Message:

see #15229 - kill Main. RIP

Location:
trunk
Files:
1 deleted
2 edited

Legend:

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

    r14177 r14253  
    8888import org.openstreetmap.josm.data.Version;
    8989import org.openstreetmap.josm.data.oauth.OAuthAccessTokenHolder;
    90 import org.openstreetmap.josm.data.osm.DataSet;
    91 import org.openstreetmap.josm.data.osm.IPrimitive;
    92 import org.openstreetmap.josm.data.osm.OsmDataManager;
    93 import org.openstreetmap.josm.data.osm.OsmPrimitive;
    9490import org.openstreetmap.josm.data.osm.UserInfo;
    9591import org.openstreetmap.josm.data.osm.search.SearchMode;
     
    173169 * @author imi
    174170 */
    175 @SuppressWarnings("deprecation")
    176 public class MainApplication extends org.openstreetmap.josm.Main {
     171public class MainApplication {
    177172
    178173    /**
     
    416411    public static MainFrame getMainFrame() {
    417412        return mainFrame;
    418     }
    419 
    420     /**
    421      * @deprecated Use {@code OsmDataManager.getInstance().getInProgressSelection()}
    422      */
    423     @Deprecated
    424     @Override
    425     public Collection<OsmPrimitive> getInProgressSelection() {
    426         return OsmDataManager.getInstance().getInProgressSelection();
    427     }
    428 
    429     /**
    430      * @deprecated Use {@code OsmDataManager.getInstance().getInProgressSelection()}
    431      */
    432     @Deprecated
    433     @Override
    434     public Collection<? extends IPrimitive> getInProgressISelection() {
    435         return OsmDataManager.getInstance().getInProgressSelection();
    436     }
    437 
    438     /**
    439      * @deprecated Use {@code OsmDataManager.getInstance().getEditDataSet()}
    440      */
    441     @Deprecated
    442     @Override
    443     public DataSet getEditDataSet() {
    444         return OsmDataManager.getInstance().getEditDataSet();
    445     }
    446 
    447     /**
    448      * @deprecated Use {@code OsmDataManager.getInstance().getActiveDataSet()}
    449      */
    450     @Deprecated
    451     @Override
    452     public DataSet getActiveDataSet() {
    453         return OsmDataManager.getInstance().getActiveDataSet();
    454     }
    455 
    456     /**
    457      * @deprecated Use {@code OsmDataManager.getInstance().setActiveDataSet}
    458      */
    459     @Deprecated
    460     @Override
    461     public void setActiveDataSet(DataSet ds) {
    462         OsmDataManager.getInstance().setActiveDataSet(ds);
    463     }
    464 
    465     /**
    466      * @deprecated Use {@code OsmDataManager.getInstance().containsDataSet}
    467      */
    468     @Deprecated
    469     @Override
    470     public boolean containsDataSet(DataSet ds) {
    471         return getLayerManager().getLayersOfType(OsmDataLayer.class).stream().anyMatch(l -> l.data.equals(ds));
    472413    }
    473414
     
    881822        }
    882823        mainPanel = mainFrame.getPanel();
    883         org.openstreetmap.josm.Main.parent = mainFrame;
    884824
    885825        if (args.hasOption(Option.LOAD_PREFERENCES)) {
  • trunk/test/unit/org/openstreetmap/josm/JOSMFixture.java

    r14149 r14253  
    155155    }
    156156
    157     @SuppressWarnings("deprecation")
    158157    private void setupGUI() {
    159158        JOSMTestRules.cleanLayerEnvironment();
     
    165164        initMainPanel(false);
    166165        initToolbar();
    167         if (Main.main == null) {
     166        if (MainApplication.getMenu() == null) {
    168167            Lifecycle.initialize(new MainInitialization(new MainApplication()));
    169168        }
Note: See TracChangeset for help on using the changeset viewer.