Ticket #9584: cardinaldirections.patch
| File cardinaldirections.patch, 29.2 KB (added by , 12 years ago) |
|---|
-
.classpath
1 <?xml version="1.0" encoding="UTF-8"?> 2 <classpath> 3 <classpathentry kind="src" path="src"/> 4 <classpathentry kind="src" path="test/unit"/> 5 <classpathentry kind="src" path="test/functional"/> 6 <classpathentry excluding="build/|data_nodist/|dist/|doc/|lib/|macosx/|nb/|src/|test/|test/build/|test/functional/|test/performance/|test/unit/|tools/|utils/" kind="src" path=""/> 7 <classpathentry kind="src" path="test/performance"/> 8 <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/> 9 <classpathentry kind="lib" path="test/lib/fest/fest-assert-1.0.jar"/> 10 <classpathentry kind="lib" path="test/lib/fest/fest-reflect-1.1.jar"/> 11 <classpathentry kind="lib" path="test/lib/fest/fest-swing-1.1.jar"/> 12 <classpathentry kind="lib" path="test/lib/fest/fest-util-1.0.jar"/> 13 <classpathentry kind="lib" path="test/lib/fest/jcip-annotations-1.0.jar"/> 14 <classpathentry kind="lib" path="test/lib/fest/MRJToolkitStubs-1.0.jar"/> 15 <classpathentry kind="lib" path="test/lib/jfcunit.jar"/> 16 <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> 17 <classpathentry exported="true" kind="con" path="GROOVY_SUPPORT"/> 18 <classpathentry kind="lib" path="test/lib/unitils-core/commons-collections-3.2.jar"/> 19 <classpathentry kind="lib" path="test/lib/unitils-core/commons-lang-2.3.jar"/> 20 <classpathentry kind="lib" path="test/lib/unitils-core/commons-logging-1.1.jar"/> 21 <classpathentry kind="lib" path="test/lib/unitils-core/ognl-2.6.9.jar"/> 22 <classpathentry kind="lib" path="test/lib/unitils-core/unitils-core-3.3.jar"/> 23 <classpathentry kind="lib" path="test/lib/fest/debug-1.0.jar"/> 24 <classpathentry kind="output" path="bin"/> 25 </classpath> 1 <?xml version="1.0" encoding="UTF-8"?> 2 <classpath> 3 <classpathentry kind="src" path="src"/> 4 <classpathentry kind="src" path="test/unit"/> 5 <classpathentry kind="src" path="test/functional"/> 6 <classpathentry excluding="build/|data_nodist/|dist/|doc/|lib/|macosx/|nb/|src/|test/|test/build/|test/functional/|test/performance/|test/unit/|tools/|utils/" kind="src" path=""/> 7 <classpathentry kind="src" path="test/performance"/> 8 <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/> 9 <classpathentry kind="lib" path="test/lib/fest/fest-assert-1.0.jar"/> 10 <classpathentry kind="lib" path="test/lib/fest/fest-reflect-1.1.jar"/> 11 <classpathentry kind="lib" path="test/lib/fest/fest-swing-1.1.jar"/> 12 <classpathentry kind="lib" path="test/lib/fest/fest-util-1.0.jar"/> 13 <classpathentry kind="lib" path="test/lib/fest/jcip-annotations-1.0.jar"/> 14 <classpathentry kind="lib" path="test/lib/fest/MRJToolkitStubs-1.0.jar"/> 15 <classpathentry kind="lib" path="test/lib/jfcunit.jar"/> 16 <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> 17 <classpathentry exported="true" kind="con" path="GROOVY_SUPPORT"/> 18 <classpathentry kind="lib" path="test/lib/unitils-core/commons-collections-3.2.jar"/> 19 <classpathentry kind="lib" path="test/lib/unitils-core/commons-lang-2.3.jar"/> 20 <classpathentry kind="lib" path="test/lib/unitils-core/commons-logging-1.1.jar"/> 21 <classpathentry kind="lib" path="test/lib/unitils-core/ognl-2.6.9.jar"/> 22 <classpathentry kind="lib" path="test/lib/unitils-core/unitils-core-3.3.jar"/> 23 <classpathentry kind="lib" path="test/lib/fest/debug-1.0.jar"/> 24 <classpathentry kind="lib" path="test/lib/junit/hamcrest-core-1.3.jar"/> 25 <classpathentry kind="output" path="bin"/> 26 </classpath> -
REVISION.XML
1 fatal: Not a git repository (or any of the parent directories): .git -
src/org/openstreetmap/josm/corrector/ReverseWayTagCorrector.java
149 149 150 150 private static final StringSwitcher[] stringSwitchers = new StringSwitcher[] { 151 151 new StringSwitcher("left", "right"), 152 new StringSwitcher("forward s", "backwards"),152 new StringSwitcher("forward", "backward"), 153 153 new StringSwitcher("east", "west"), 154 154 new StringSwitcher("north", "south"), 155 155 FORWARD_BACKWARD, UP_DOWN … … 193 193 @Override 194 194 public Collection<Command> execute(Way oldway, Way way) throws UserCancelException { 195 195 Map<OsmPrimitive, List<TagCorrection>> tagCorrectionsMap = 196 new HashMap<OsmPrimitive, List<TagCorrection>>();196 new HashMap<OsmPrimitive, List<TagCorrection>>(); 197 197 198 198 List<TagCorrection> tagCorrections = new ArrayList<TagCorrection>(); 199 199 for (String key : way.keySet()) { … … 219 219 } 220 220 221 221 Map<OsmPrimitive, List<RoleCorrection>> roleCorrectionMap = 222 new HashMap<OsmPrimitive, List<RoleCorrection>>();222 new HashMap<OsmPrimitive, List<RoleCorrection>>(); 223 223 List<RoleCorrection> roleCorrections = new ArrayList<RoleCorrection>(); 224 224 225 225 Collection<OsmPrimitive> referrers = oldway.getReferrers(); -
src/org/openstreetmap/josm/data/validation/tests/ConditionalKeys.java
1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.data.validation.tests; 3 3 4 import org.openstreetmap.josm.data.osm.OsmPrimitive; 5 import org.openstreetmap.josm.data.validation.Severity; 6 import org.openstreetmap.josm.data.validation.Test; 7 import org.openstreetmap.josm.data.validation.TestError; 8 import org.openstreetmap.josm.tools.Predicates; 9 import org.openstreetmap.josm.tools.Utils; 4 import static org.openstreetmap.josm.tools.I18n.tr; 10 5 11 6 import java.util.ArrayList; 12 7 import java.util.Arrays; … … 17 12 import java.util.regex.Matcher; 18 13 import java.util.regex.Pattern; 19 14 20 import static org.openstreetmap.josm.tools.I18n.tr; 15 import org.openstreetmap.josm.data.osm.OsmPrimitive; 16 import org.openstreetmap.josm.data.validation.Severity; 17 import org.openstreetmap.josm.data.validation.Test; 18 import org.openstreetmap.josm.data.validation.TestError; 19 import org.openstreetmap.josm.tools.Predicates; 20 import org.openstreetmap.josm.tools.Utils; 21 21 22 22 public class ConditionalKeys extends Test.TagTest { 23 23 … … 55 55 } 56 56 57 57 public static boolean isDirection(String part) { 58 return "forward".equals(part) || "backward".equals(part); 58 return "forward".equals(part) || "backward".equals(part) || 59 (part != null && (part.startsWith("north") || part.startsWith("south") || 60 part.startsWith("east") || part.startsWith("west"))); 59 61 } 60 62 61 63 public boolean isKeyValid(String key) { … … 68 70 return parts.length == 3 && isRestrictionType(parts[0]) && isTransportationMode(parts[1]) && isDirection(parts[2]) 69 71 || parts.length == 1 && (isRestrictionType(parts[0]) || isTransportationMode(parts[0])) 70 72 || parts.length == 2 && ( 71 isRestrictionType(parts[0]) && (isTransportationMode(parts[1]) || isDirection(parts[1]))73 isRestrictionType(parts[0]) && (isTransportationMode(parts[1]) || isDirection(parts[1])) 72 74 || isTransportationMode(parts[0]) && isDirection(parts[1])); 73 75 } 74 76 -
src/org/openstreetmap/josm/gui/dialogs/relation/MemberTable.java
120 120 } 121 121 122 122 ListSelectionListener highlighterListener = new ListSelectionListener() { 123 @Override 124 public void valueChanged(ListSelectionEvent lse) { 125 if (Main.isDisplayingMapView()) { 126 Collection<RelationMember> sel = getMemberTableModel().getSelectedMembers(); 127 final List<OsmPrimitive> toHighlight = new ArrayList<OsmPrimitive>(); 128 for (RelationMember r: sel) { 129 if (r.getMember().isUsable()) { 130 toHighlight.add(r.getMember()); 123 @Override 124 public void valueChanged(ListSelectionEvent lse) { 125 if (Main.isDisplayingMapView()) { 126 Collection<RelationMember> sel = getMemberTableModel().getSelectedMembers(); 127 final List<OsmPrimitive> toHighlight = new ArrayList<OsmPrimitive>(); 128 for (RelationMember r: sel) { 129 if (r.getMember().isUsable()) { 130 toHighlight.add(r.getMember()); 131 } 132 } 133 SwingUtilities.invokeLater(new Runnable() { 134 @Override 135 public void run() { 136 if (highlightHelper.highlightOnly(toHighlight)) { 137 Main.map.mapView.repaint(); 131 138 } 132 139 } 133 SwingUtilities.invokeLater(new Runnable() { 134 @Override 135 public void run() { 136 if (highlightHelper.highlightOnly(toHighlight)) { 137 Main.map.mapView.repaint(); 138 } 139 } 140 }); 141 } 142 }}; 140 }); 141 } 142 }}; 143 143 144 private void initHighlighting() { 145 highlightEnabled = Main.pref.getBoolean("draw.target-highlight", true); 146 if (!highlightEnabled) return; 147 getMemberTableModel().getSelectionModel().addListSelectionListener(highlighterListener); 148 if (Main.isDisplayingMapView()) { 149 HighlightHelper.clearAllHighlighted(); 150 Main.map.mapView.repaint(); 144 private void initHighlighting() { 145 highlightEnabled = Main.pref.getBoolean("draw.target-highlight", true); 146 if (!highlightEnabled) return; 147 getMemberTableModel().getSelectionModel().addListSelectionListener(highlighterListener); 148 if (Main.isDisplayingMapView()) { 149 HighlightHelper.clearAllHighlighted(); 150 Main.map.mapView.repaint(); 151 } 151 152 } 152 }153 153 154 /** 155 * Action to be run when the user navigates to the next cell in the table, for instance by 156 * pressing TAB or ENTER. The action alters the standard navigation path from cell to cell: <ul> 157 * <li>it jumps over cells in the first column</li> <li>it automatically add a new empty row 158 * when the user leaves the last cell in the table</li></ul> 159 * 160 * 161 */ 162 class SelectNextColumnCellAction extends AbstractAction { 163 @Override 164 public void actionPerformed(ActionEvent e) { 165 run(); 166 } 167 168 public void run() { 169 int col = getSelectedColumn(); 170 int row = getSelectedRow(); 171 if (getCellEditor() != null) { 172 getCellEditor().stopCellEditing(); 154 /** 155 * Action to be run when the user navigates to the next cell in the table, for instance by 156 * pressing TAB or ENTER. The action alters the standard navigation path from cell to cell: <ul> 157 * <li>it jumps over cells in the first column</li> <li>it automatically add a new empty row 158 * when the user leaves the last cell in the table</li></ul> 159 * 160 * 161 */ 162 class SelectNextColumnCellAction extends AbstractAction { 163 @Override 164 public void actionPerformed(ActionEvent e) { 165 run(); 173 166 } 174 167 175 if (col == 0 && row < getRowCount() - 1) { 176 row++; 177 } else if (row < getRowCount() - 1) { 178 col = 0; 179 row++; 180 } else { 181 // go to next component, no more rows in this table 182 KeyboardFocusManager manager = KeyboardFocusManager.getCurrentKeyboardFocusManager(); 183 manager.focusNextComponent(); 184 return; 168 public void run() { 169 int col = getSelectedColumn(); 170 int row = getSelectedRow(); 171 if (getCellEditor() != null) { 172 getCellEditor().stopCellEditing(); 173 } 174 175 if (col == 0 && row < getRowCount() - 1) { 176 row++; 177 } else if (row < getRowCount() - 1) { 178 col = 0; 179 row++; 180 } else { 181 // go to next component, no more rows in this table 182 KeyboardFocusManager manager = KeyboardFocusManager.getCurrentKeyboardFocusManager(); 183 manager.focusNextComponent(); 184 return; 185 } 186 changeSelection(row, col, false, false); 185 187 } 186 changeSelection(row, col, false, false);187 188 } 188 }189 189 190 /**191 * Action to be run when the user navigates to the previous cell in the table, for instance by192 * pressing Shift-TAB193 *194 */195 private class SelectPreviousColumnCellAction extends AbstractAction {190 /** 191 * Action to be run when the user navigates to the previous cell in the table, for instance by 192 * pressing Shift-TAB 193 * 194 */ 195 private class SelectPreviousColumnCellAction extends AbstractAction { 196 196 197 @Override198 public void actionPerformed(ActionEvent e) {199 int col = getSelectedColumn();200 int row = getSelectedRow();201 if (getCellEditor() != null) {202 getCellEditor().stopCellEditing();203 }197 @Override 198 public void actionPerformed(ActionEvent e) { 199 int col = getSelectedColumn(); 200 int row = getSelectedRow(); 201 if (getCellEditor() != null) { 202 getCellEditor().stopCellEditing(); 203 } 204 204 205 if (col <= 0 && row <= 0) { 206 // change nothing 207 } else if (row > 0) { 208 col = 0; 209 row--; 205 if (col <= 0 && row <= 0) { 206 // change nothing 207 } else if (row > 0) { 208 col = 0; 209 row--; 210 } 211 changeSelection(row, col, false, false); 210 212 } 211 changeSelection(row, col, false, false);212 213 } 213 }214 214 215 @Override216 public void unlinkAsListener() {217 super.unlinkAsListener();218 MapView.removeLayerChangeListener(zoomToGap);219 }215 @Override 216 public void unlinkAsListener() { 217 super.unlinkAsListener(); 218 MapView.removeLayerChangeListener(zoomToGap); 219 } 220 220 221 public void stopHighlighting() { 222 if (highlighterListener == null) return; 223 if (!highlightEnabled) return; 224 getMemberTableModel().getSelectionModel().removeListSelectionListener(highlighterListener); 225 highlighterListener = null; 226 if (Main.isDisplayingMapView()) { 227 HighlightHelper.clearAllHighlighted(); 228 Main.map.mapView.repaint(); 221 public void stopHighlighting() { 222 if (highlighterListener == null) return; 223 if (!highlightEnabled) return; 224 getMemberTableModel().getSelectionModel().removeListSelectionListener(highlighterListener); 225 highlighterListener = null; 226 if (Main.isDisplayingMapView()) { 227 HighlightHelper.clearAllHighlighted(); 228 Main.map.mapView.repaint(); 229 } 229 230 } 230 }231 231 232 private class SelectPreviousGapAction extends AbstractAction {232 private class SelectPreviousGapAction extends AbstractAction { 233 233 234 public SelectPreviousGapAction() {235 putValue(NAME, tr("Select previous Gap"));236 putValue(SHORT_DESCRIPTION, tr("Select the previous relation member which gives rise to a gap"));237 }234 public SelectPreviousGapAction() { 235 putValue(NAME, tr("Select previous Gap")); 236 putValue(SHORT_DESCRIPTION, tr("Select the previous relation member which gives rise to a gap")); 237 } 238 238 239 @Override 240 public void actionPerformed(ActionEvent e) { 241 int i = getSelectedRow() - 1; 242 while (i >= 0 && getMemberTableModel().getWayConnection(i).linkPrev) { 243 i--; 239 @Override 240 public void actionPerformed(ActionEvent e) { 241 int i = getSelectedRow() - 1; 242 while (i >= 0 && getMemberTableModel().getWayConnection(i).linkPrev) { 243 i--; 244 } 245 if (i >= 0) { 246 getSelectionModel().setSelectionInterval(i, i); 247 } 244 248 } 245 if (i >= 0) {246 getSelectionModel().setSelectionInterval(i, i);247 }248 249 } 249 }250 250 251 private class SelectNextGapAction extends AbstractAction {251 private class SelectNextGapAction extends AbstractAction { 252 252 253 public SelectNextGapAction() {254 putValue(NAME, tr("Select next Gap"));255 putValue(SHORT_DESCRIPTION, tr("Select the next relation member which gives rise to a gap"));256 }253 public SelectNextGapAction() { 254 putValue(NAME, tr("Select next Gap")); 255 putValue(SHORT_DESCRIPTION, tr("Select the next relation member which gives rise to a gap")); 256 } 257 257 258 @Override 259 public void actionPerformed(ActionEvent e) { 260 int i = getSelectedRow() + 1; 261 while (i < getRowCount() && getMemberTableModel().getWayConnection(i).linkNext) { 262 i++; 258 @Override 259 public void actionPerformed(ActionEvent e) { 260 int i = getSelectedRow() + 1; 261 while (i < getRowCount() && getMemberTableModel().getWayConnection(i).linkNext) { 262 i++; 263 } 264 if (i < getRowCount()) { 265 getSelectionModel().setSelectionInterval(i, i); 266 } 263 267 } 264 if (i < getRowCount()) {265 getSelectionModel().setSelectionInterval(i, i);266 }267 268 } 268 }269 269 270 private class ZoomToGapAction extends AbstractAction implements LayerChangeListener, ListSelectionListener {270 private class ZoomToGapAction extends AbstractAction implements LayerChangeListener, ListSelectionListener { 271 271 272 public ZoomToGapAction() {273 putValue(NAME, tr("Zoom to Gap"));274 putValue(SHORT_DESCRIPTION, tr("Zoom to the gap in the way sequence"));275 updateEnabledState();276 }272 public ZoomToGapAction() { 273 putValue(NAME, tr("Zoom to Gap")); 274 putValue(SHORT_DESCRIPTION, tr("Zoom to the gap in the way sequence")); 275 updateEnabledState(); 276 } 277 277 278 private WayConnectionType getConnectionType() {279 return getMemberTableModel().getWayConnection(getSelectedRows()[0]);280 }278 private WayConnectionType getConnectionType() { 279 return getMemberTableModel().getWayConnection(getSelectedRows()[0]); 280 } 281 281 282 private final Collection<Direction> connectionTypesOfInterest = Arrays.asList(WayConnectionType.Direction.FORWARD, WayConnectionType.Direction.BACKWARD);282 private final Collection<Direction> connectionTypesOfInterest = Arrays.asList(WayConnectionType.Direction.FORWARD, WayConnectionType.Direction.BACKWARD); 283 283 284 private boolean hasGap() {285 WayConnectionType connectionType = getConnectionType();286 return connectionTypesOfInterest.contains(connectionType.direction)287 && !(connectionType.linkNext && connectionType.linkPrev);288 }284 private boolean hasGap() { 285 WayConnectionType connectionType = getConnectionType(); 286 return connectionTypesOfInterest.contains(connectionType.direction.interpretation()) 287 && !(connectionType.linkNext && connectionType.linkPrev); 288 } 289 289 290 @Override 291 public void actionPerformed(ActionEvent e) { 292 WayConnectionType connectionType = getConnectionType(); 293 Way way = (Way) getMemberTableModel().getReferredPrimitive(getSelectedRows()[0]); 294 if (!connectionType.linkPrev) { 295 getLayer().data.setSelected(WayConnectionType.Direction.FORWARD.equals(connectionType.direction) 296 ? way.firstNode() : way.lastNode()); 297 AutoScaleAction.autoScale("selection"); 298 } else if (!connectionType.linkNext) { 299 getLayer().data.setSelected(WayConnectionType.Direction.FORWARD.equals(connectionType.direction) 300 ? way.lastNode() : way.firstNode()); 301 AutoScaleAction.autoScale("selection"); 290 @Override 291 public void actionPerformed(ActionEvent e) { 292 WayConnectionType connectionType = getConnectionType(); 293 Way way = (Way) getMemberTableModel().getReferredPrimitive(getSelectedRows()[0]); 294 if (!connectionType.linkPrev) { 295 getLayer().data.setSelected(WayConnectionType.Direction.FORWARD.equals(connectionType.direction.interpretation()) 296 ? way.firstNode() : way.lastNode()); 297 AutoScaleAction.autoScale("selection"); 298 } else if (!connectionType.linkNext) { 299 getLayer().data.setSelected(WayConnectionType.Direction.FORWARD.equals(connectionType.direction.interpretation()) 300 ? way.lastNode() : way.firstNode()); 301 AutoScaleAction.autoScale("selection"); 302 } 302 303 } 303 }304 304 305 private void updateEnabledState() {306 setEnabled(Main.main != null307 && Main.main.getEditLayer() == getLayer()308 && getSelectedRowCount() == 1309 && hasGap());310 }305 private void updateEnabledState() { 306 setEnabled(Main.main != null 307 && Main.main.getEditLayer() == getLayer() 308 && getSelectedRowCount() == 1 309 && hasGap()); 310 } 311 311 312 @Override313 public void valueChanged(ListSelectionEvent e) {314 updateEnabledState();315 }312 @Override 313 public void valueChanged(ListSelectionEvent e) { 314 updateEnabledState(); 315 } 316 316 317 @Override318 public void activeLayerChange(Layer oldLayer, Layer newLayer) {319 updateEnabledState();320 }317 @Override 318 public void activeLayerChange(Layer oldLayer, Layer newLayer) { 319 updateEnabledState(); 320 } 321 321 322 @Override 323 public void layerAdded(Layer newLayer) { 324 updateEnabledState(); 322 @Override 323 public void layerAdded(Layer newLayer) { 324 updateEnabledState(); 325 } 326 327 @Override 328 public void layerRemoved(Layer oldLayer) { 329 updateEnabledState(); 330 } 325 331 } 326 332 327 @Override 328 public void layerRemoved(Layer oldLayer) { 329 updateEnabledState(); 333 protected MemberTableModel getMemberTableModel() { 334 return (MemberTableModel) getModel(); 330 335 } 331 }332 333 protected MemberTableModel getMemberTableModel() {334 return (MemberTableModel) getModel();335 }336 336 } -
src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableLinkedCellRenderer.java
161 161 /* special icons */ 162 162 Image arrow = null; 163 163 switch (value.direction) { 164 case NORTH: 165 case EAST: 164 166 case FORWARD: 165 167 arrow = arrowDown; 166 168 break; 169 case SOUTH: 170 case WEST: 167 171 case BACKWARD: 168 172 arrow = arrowUp; 169 173 break; -
src/org/openstreetmap/josm/gui/dialogs/relation/sort/RelationSortUtils.java
15 15 private RelationSortUtils() { 16 16 // Hide default constructor for utils classes 17 17 } 18 18 19 19 /** 20 20 * determine, if the way i is a roundabout and if yes, what type of roundabout 21 21 */ … … 49 49 } 50 50 51 51 static boolean isBackward(final RelationMember member){ 52 return member.getRole().equals("backward") ;52 return member.getRole().equals("backward") || member.getRole().startsWith("south") || member.getRole().startsWith("west"); 53 53 } 54 54 55 55 static boolean isForward(final RelationMember member){ 56 return member.getRole().equals("forward") ;56 return member.getRole().equals("forward") || member.getRole().startsWith("north") || member.getRole().startsWith("east"); 57 57 } 58 58 59 59 static boolean isOneway(final RelationMember member){ -
src/org/openstreetmap/josm/gui/dialogs/relation/sort/WayConnectionType.java
25 25 public Direction direction; 26 26 27 27 public enum Direction { 28 FORWARD, BACKWARD, ROUNDABOUT_LEFT, ROUNDABOUT_RIGHT, NONE; 28 FORWARD { 29 @Override 30 public Direction interpretation() { 31 return FORWARD; 32 } 33 }, 34 BACKWARD { 35 @Override 36 public Direction interpretation() { 37 return BACKWARD; 38 } 39 }, 40 ROUNDABOUT_LEFT { 41 @Override 42 public Direction interpretation() { 43 return FORWARD; 44 } 45 }, 46 ROUNDABOUT_RIGHT { 47 @Override 48 public Direction interpretation() { 49 return BACKWARD; 50 } 51 }, 52 NONE { 53 @Override 54 public Direction interpretation() { 55 return FORWARD; 56 } 57 }, 58 NORTH { 59 @Override 60 public Direction interpretation() { 61 return FORWARD; 62 } 63 }, 64 SOUTH { 65 @Override 66 public Direction interpretation() { 67 return BACKWARD; 68 } 69 }, 70 EAST { 71 @Override 72 public Direction interpretation() { 73 return FORWARD; 74 } 75 }, 76 WEST { 77 @Override 78 public Direction interpretation() { 79 return BACKWARD; 80 } 81 }; 29 82 83 public abstract Direction interpretation(); 84 30 85 public boolean isRoundabout() { 31 86 return this == ROUNDABOUT_RIGHT || this == ROUNDABOUT_LEFT; 32 87 } -
src/org/openstreetmap/josm/gui/dialogs/relation/sort/WayConnectionTypeCalculator.java
248 248 List<Node> refNodes= new ArrayList<Node>(); 249 249 250 250 switch (ref_direction) { 251 case NORTH: 252 case EAST: 251 253 case FORWARD: 252 254 refNodes.add(way_ref.lastNode()); 253 255 break; 256 case SOUTH: 257 case WEST: 254 258 case BACKWARD: 255 259 refNodes.add(way_ref.firstNode()); 256 260 break; -
src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java
171 171 172 172 public boolean required = false; 173 173 public long count = 0; 174 175 @Override 176 public String toString() { 177 return "[Role key = " + key + ", text = " + text + "]"; 178 } 174 179 175 180 public void setType(String types) throws SAXException { 176 181 this.types = getType(types);
