Changeset 32493 in osm for applications/editors/josm/plugins
- Timestamp:
- 2016-07-01T09:54:34+02:00 (8 years ago)
- Location:
- applications/editors/josm/plugins/namemanager
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/namemanager/build.xml
r31926 r32493 4 4 <property name="commit.message" value="..."/> 5 5 <!-- 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"/> 7 7 8 8 <!-- Configure these properties (replace "..." accordingly). -
applications/editors/josm/plugins/namemanager/src/org/openstreetmap/josm/plugins/namemanager/dialog/NameManagerDialog.java
r30737 r32493 13 13 import java.awt.event.ActionEvent; 14 14 import java.awt.event.ActionListener; 15 import java.awt.event.KeyAdapter; 15 16 import java.awt.event.KeyEvent; 16 import java.awt.event.KeyListener;17 17 import java.util.ArrayList; 18 18 import java.util.Collections; … … 179 179 tagNameAM = new AutoCompletingTextField(); 180 180 AutoCompletionList list = new AutoCompletionList(); 181 Main. main.getEditLayer().data.getAutoCompletionManager().populateWithKeys(list);181 Main.getLayerManager().getEditLayer().data.getAutoCompletionManager().populateWithKeys(list); 182 182 tagNameAM.setAutoCompletionList(list); 183 183 labelTagValueAM = new JLabel(tr(TAG_VALUE)); 184 184 tagValueAM = new AutoCompletingTextField(); 185 tagNameAM.addKeyListener(new Key Listener() {185 tagNameAM.addKeyListener(new KeyAdapter() { 186 186 @Override 187 187 public void keyTyped(KeyEvent arg0) { … … 192 192 } 193 193 list.clear(); 194 Main. main.getEditLayer().data.getAutoCompletionManager().populateWithTagValues(list, tagNameAM.getText());194 Main.getLayerManager().getEditLayer().data.getAutoCompletionManager().populateWithTagValues(list, tagNameAM.getText()); 195 195 tagValueAM.setAutoCompletionList(list); 196 196 } 197 }198 199 @Override200 public void keyReleased(KeyEvent arg0) {201 }202 203 @Override204 public void keyPressed(KeyEvent arg0) {205 197 } 206 198 }); -
applications/editors/josm/plugins/namemanager/src/org/openstreetmap/josm/plugins/namemanager/listeners/NameManagerAction.java
r29930 r32493 6 6 import java.util.Collection; 7 7 8 import org.openstreetmap.josm.Main;9 8 import org.openstreetmap.josm.actions.JosmAction; 10 9 import org.openstreetmap.josm.data.SelectionChangedListener; … … 51 50 } 52 51 NameManagerDialog dialog = NameManagerDialog.getInstance(); 53 Way selectedWay = (Way) Main.main.getCurrentDataSet().getSelectedWays().iterator().next();52 Way selectedWay = (Way) getLayerManager().getEditDataSet().getSelectedWays().iterator().next(); 54 53 dialog.setSelectedWay(selectedWay); 55 54 dialog.setWaysInsideSelectedArea(NameManagerUtils.getWaysInsideSelectedArea(selectedWay)); … … 71 70 public void selectionChanged(Collection<? extends OsmPrimitive> newSelection) { 72 71 boolean enabledState = false; 73 DataSet ds = Main.main.getCurrentDataSet();72 DataSet ds = getLayerManager().getEditDataSet(); 74 73 if (newSelection != null && ds != null) { 75 74 Collection<Way> selectedWays = ds.getSelectedWays(); -
applications/editors/josm/plugins/namemanager/src/org/openstreetmap/josm/plugins/namemanager/utils/NameManagerUtils.java
r30737 r32493 47 47 Coordinate topLeftCorner = getTopLeftCorener(areaBorder); 48 48 List<Pair<Node, Node>> areaBorderLines = areaBorder.getNodePairs(true); 49 Collection<Way> ways = Main. main.getCurrentDataSet().getWays();49 Collection<Way> ways = Main.getLayerManager().getEditDataSet().getWays(); 50 50 ways: for (Way way : ways) { 51 51 if (areaBorder == way) {
Note:
See TracChangeset
for help on using the changeset viewer.