Changeset 34517 in osm for applications/editors/josm


Ignore:
Timestamp:
2018-08-18T18:00:08+02:00 (6 years ago)
Author:
donvip
Message:

update to JOSM 14153

Location:
applications/editors/josm/plugins/HouseNumberTaggingTool/src/org/openstreetmap/josm/plugins/housenumbertool
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/HouseNumberTaggingTool/src/org/openstreetmap/josm/plugins/housenumbertool/LaunchAction.java

    r34069 r34517  
    55import java.awt.event.KeyEvent;
    66import java.io.File;
    7 import java.util.Collection;
     7import java.util.Set;
    88
    99import org.openstreetmap.josm.actions.JosmAction;
    10 import org.openstreetmap.josm.data.SelectionChangedListener;
    11 import org.openstreetmap.josm.data.osm.DataSet;
     10import org.openstreetmap.josm.data.osm.DataSelectionListener;
    1211import org.openstreetmap.josm.data.osm.OsmPrimitive;
     12import org.openstreetmap.josm.data.osm.event.SelectionEventManager;
    1313import org.openstreetmap.josm.tools.Shortcut;
    1414
    15 public class LaunchAction extends JosmAction implements SelectionChangedListener {
     15public class LaunchAction extends JosmAction implements DataSelectionListener {
    1616
    1717    private OsmPrimitive selection = null;
     
    3131
    3232        this.pluginDir = pluginDir;
    33         DataSet.addSelectionListener(this);
     33        SelectionEventManager.getInstance().addSelectionListener(this);
    3434        setEnabled(false);
    3535    }
     
    5353
    5454    @Override
    55     public void selectionChanged(Collection<? extends OsmPrimitive> newSelection) {
     55    public void selectionChanged(SelectionChangeEvent event) {
     56        Set<OsmPrimitive> newSelection = event.getSelection();
    5657        if (newSelection != null && newSelection.size() == 1) {
    5758            setEnabled(true);
  • applications/editors/josm/plugins/HouseNumberTaggingTool/src/org/openstreetmap/josm/plugins/housenumbertool/TagDialog.java

    r34074 r34517  
    3737import javax.swing.SwingUtilities;
    3838
    39 import org.openstreetmap.josm.Main;
    4039import org.openstreetmap.josm.command.ChangePropertyCommand;
    4140import org.openstreetmap.josm.command.Command;
    4241import org.openstreetmap.josm.command.SequenceCommand;
     42import org.openstreetmap.josm.data.UndoRedoHandler;
    4343import org.openstreetmap.josm.data.osm.OsmPrimitive;
    4444import org.openstreetmap.josm.data.tagging.ac.AutoCompletionItem;
     
    106106     */
    107107    public TagDialog(File pluginDir, OsmPrimitive selection) {
    108         super(Main.parent, tr("House Number Editor"), new String[] { tr("OK"), tr("Cancel") }, true);
     108        super(MainApplication.getMainFrame(), tr("House Number Editor"), new String[] { tr("OK"), tr("Cancel") }, true);
    109109        this.pluginDir = pluginDir;
    110110        this.selection = selection;
     
    521521
    522522            // executes the commands and adds them to the undo/redo chains
    523             Main.main.undoRedo.add(sequenceCommand);
     523            UndoRedoHandler.getInstance().add(sequenceCommand);
    524524        }
    525525    }
Note: See TracChangeset for help on using the changeset viewer.