Ignore:
Timestamp:
2016-07-01T09:54:34+02:00 (8 years ago)
Author:
donvip
Message:

remove calls to deprecated methods

Location:
applications/editors/josm/plugins/namemanager
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/namemanager/build.xml

    r31926 r32493  
    44    <property name="commit.message" value="..."/>
    55    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    6     <property name="plugin.main.version" value="7001"/>
     6    <property name="plugin.main.version" value="10353"/>
    77
    88    <!-- Configure these properties (replace "..." accordingly).
  • applications/editors/josm/plugins/namemanager/src/org/openstreetmap/josm/plugins/namemanager/dialog/NameManagerDialog.java

    r30737 r32493  
    1313import java.awt.event.ActionEvent;
    1414import java.awt.event.ActionListener;
     15import java.awt.event.KeyAdapter;
    1516import java.awt.event.KeyEvent;
    16 import java.awt.event.KeyListener;
    1717import java.util.ArrayList;
    1818import java.util.Collections;
     
    179179        tagNameAM = new AutoCompletingTextField();
    180180        AutoCompletionList list = new AutoCompletionList();
    181         Main.main.getEditLayer().data.getAutoCompletionManager().populateWithKeys(list);
     181        Main.getLayerManager().getEditLayer().data.getAutoCompletionManager().populateWithKeys(list);
    182182        tagNameAM.setAutoCompletionList(list);
    183183        labelTagValueAM = new JLabel(tr(TAG_VALUE));
    184184        tagValueAM = new AutoCompletingTextField();
    185         tagNameAM.addKeyListener(new KeyListener() {
     185        tagNameAM.addKeyListener(new KeyAdapter() {
    186186            @Override
    187187            public void keyTyped(KeyEvent arg0) {
     
    192192                    }
    193193                    list.clear();
    194                     Main.main.getEditLayer().data.getAutoCompletionManager().populateWithTagValues(list, tagNameAM.getText());
     194                    Main.getLayerManager().getEditLayer().data.getAutoCompletionManager().populateWithTagValues(list, tagNameAM.getText());
    195195                    tagValueAM.setAutoCompletionList(list);
    196196                }
    197             }
    198 
    199             @Override
    200             public void keyReleased(KeyEvent arg0) {
    201             }
    202 
    203             @Override
    204             public void keyPressed(KeyEvent arg0) {
    205197            }
    206198        });
  • applications/editors/josm/plugins/namemanager/src/org/openstreetmap/josm/plugins/namemanager/listeners/NameManagerAction.java

    r29930 r32493  
    66import java.util.Collection;
    77
    8 import org.openstreetmap.josm.Main;
    98import org.openstreetmap.josm.actions.JosmAction;
    109import org.openstreetmap.josm.data.SelectionChangedListener;
     
    5150        }
    5251        NameManagerDialog dialog = NameManagerDialog.getInstance();
    53         Way selectedWay = (Way) Main.main.getCurrentDataSet().getSelectedWays().iterator().next();
     52        Way selectedWay = (Way) getLayerManager().getEditDataSet().getSelectedWays().iterator().next();
    5453        dialog.setSelectedWay(selectedWay);
    5554        dialog.setWaysInsideSelectedArea(NameManagerUtils.getWaysInsideSelectedArea(selectedWay));
     
    7170    public void selectionChanged(Collection<? extends OsmPrimitive> newSelection) {
    7271        boolean enabledState = false;
    73         DataSet ds = Main.main.getCurrentDataSet();
     72        DataSet ds = getLayerManager().getEditDataSet();
    7473        if (newSelection != null && ds != null) {
    7574            Collection<Way> selectedWays = ds.getSelectedWays();
  • applications/editors/josm/plugins/namemanager/src/org/openstreetmap/josm/plugins/namemanager/utils/NameManagerUtils.java

    r30737 r32493  
    4747            Coordinate topLeftCorner = getTopLeftCorener(areaBorder);
    4848            List<Pair<Node, Node>> areaBorderLines = areaBorder.getNodePairs(true);
    49             Collection<Way> ways = Main.main.getCurrentDataSet().getWays();
     49            Collection<Way> ways = Main.getLayerManager().getEditDataSet().getWays();
    5050            ways: for (Way way : ways) {
    5151                if (areaBorder == way) {
Note: See TracChangeset for help on using the changeset viewer.