Ignore:
Timestamp:
2016-09-07T01:01:56+02:00 (8 years ago)
Author:
donvip
Message:

fix deprecation warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/ToulouseDataSetHandler.java

    r31958 r32932  
    4545    public static final DataSetCategory CAT_CULTURE = new DataSetCategory("Culture", "presets/arts_centre.png");
    4646    public static final DataSetCategory CAT_ENFANCE = new DataSetCategory("Enfance", "presets/kindergarten.png");
    47     public static final DataSetCategory CAT_ENVIRONNEMENT = new DataSetCategory("Environnement", "styles/standard/service/recycling/recycling_container.svg");
     47    public static final DataSetCategory CAT_ENVIRONNEMENT = new DataSetCategory("Environnement",
     48            "styles/standard/service/recycling/recycling_container.svg");
    4849    public static final DataSetCategory CAT_PATRIMOINE = new DataSetCategory("Patrimoine", "presets/ruins.png");
    4950    public static final DataSetCategory CAT_SERVICES = new DataSetCategory("Services", "styles/standard/vehicle/services.png");
     
    8586    }*/
    8687
    87     private final void init(int portalId) {
     88    private void init(int portalId) {
    8889        try {
    8990            setLicense(new ToulouseLicense());
     
    141142        public void actionPerformed(ActionEvent e) {
    142143            final String baseName = OdPlugin.getInstance().getDialog().getDataLayer().getName();
    143             final DataSet baseDs = getCurrentDataSet();
     144            final DataSet baseDs = Main.getLayerManager().getEditDataSet();
    144145            for (OsmPrimitive boundary : getBoundaries()) {
    145146                DataSet data = new DataSet();
    146147                for (OsmPrimitive p : NodeWayUtils.selectAllInside(Collections.singleton(boundary), baseDs)) {
    147148                    if (p instanceof Node) {
    148                         data.addPrimitive(new Node((Node)p));
     149                        data.addPrimitive(new Node((Node) p));
    149150                    } else if (p instanceof Way) {
    150                         data.addPrimitive(new Way((Way)p));
     151                        data.addPrimitive(new Way((Way) p));
    151152                    } else if (p instanceof Relation) {
    152                         data.addPrimitive(new Relation((Relation)p));
     153                        data.addPrimitive(new Relation((Relation) p));
    153154                    }
    154155                }
     
    165166            }
    166167        }
     168
    167169        @Override
    168170        public void dataChanged(DataChangedEvent event) {
    169171            setEnabled(!getBoundaries().isEmpty());
    170172        }
     173
    171174        @Override
    172175        public void primitivesAdded(PrimitivesAddedEvent event) {
    173176        }
     177
    174178        @Override
    175179        public void primitivesRemoved(PrimitivesRemovedEvent event) {
    176180        }
     181
    177182        @Override
    178183        public void tagsChanged(TagsChangedEvent event) {
    179184        }
     185
    180186        @Override
    181187        public void nodeMoved(NodeMovedEvent event) {
    182188        }
     189
    183190        @Override
    184191        public void wayNodesChanged(WayNodesChangedEvent event) {
    185192        }
     193
    186194        @Override
    187195        public void relationMembersChanged(RelationMembersChangedEvent event) {
    188196        }
     197
    189198        @Override
    190199        public void otherDatasetChange(AbstractDatasetChangedEvent event) {
     
    196205            super(marktr("Split by municipality"), tr("Split this data by municipality (admin_level=8)."));
    197206        }
     207
    198208        @Override
    199209        protected Collection<Relation> getBoundaries() {
     
    206216            super(marktr("Split by sector"), tr("Split this data by sector (admin_level=10)."));
    207217        }
     218
    208219        @Override
    209220        protected Collection<Relation> getBoundaries() {
     
    216227            super(marktr("Split by neighbourhood"), tr("Split this data by neighbourhood (admin_level=11)."));
    217228        }
     229
    218230        @Override
    219231        protected Collection<Relation> getBoundaries() {
Note: See TracChangeset for help on using the changeset viewer.