Changeset 18071 in osm for applications/editors/josm/plugins
- Timestamp:
- 2009-10-10T23:34:39+02:00 (15 years ago)
- Location:
- applications/editors/josm/plugins
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/DataImportPlugin.java
r18063 r18071 7 7 8 8 import org.openstreetmap.josm.actions.ExtensionFileFilter; 9 import org.openstreetmap.josm. io.TangoGPS;10 import org.openstreetmap.josm. io.Tcx;9 import org.openstreetmap.josm.plugins.dataimport.io.TangoGPS; 10 import org.openstreetmap.josm.plugins.dataimport.io.Tcx; 11 11 import org.openstreetmap.josm.plugins.Plugin; 12 12 -
applications/editors/josm/plugins/michigan_left/src/MichiganLeft/MichiganLeftAction.java
r17647 r18071 28 28 public class MichiganLeftAction extends JosmAction { 29 29 private LinkedList<Command> cmds = new LinkedList<Command>(); 30 30 31 31 public MichiganLeftAction() { 32 32 super(tr("Michigan Left"), "michigan_left", tr("Adds no left turn for sets of 4 or 5 ways."), Shortcut.registerShortcut("tools:michigan_left", tr("Tool: {0}", tr("Michigan Left")), … … 50 50 { 51 51 // Find extremities of ways 52 Hashtable ExtremNodes=new Hashtable();52 Hashtable<Node, Integer> ExtremNodes=new Hashtable<Node, Integer>(); 53 53 for (OsmPrimitive prim : selection) { 54 54 if (prim instanceof Way) … … 59 59 } 60 60 } 61 System.out.println(tr("{0} extrem nodes.", ExtremNodes.size())); 62 61 System.out.println(tr("{0} extrem nodes.", ExtremNodes.size())); 62 63 63 ArrayList<Node> viaNodes=new ArrayList<Node>(); 64 64 // find via nodes (they have 3 occurences in the list) … … 72 72 viaNodes.add(extrem); 73 73 } 74 } 75 System.out.println(tr("{0} via nodes.", viaNodes.size())); 76 74 } 75 System.out.println(tr("{0} via nodes.", viaNodes.size())); 76 77 77 if (viaNodes.size() != 2) { 78 78 JOptionPane.showMessageDialog(Main.parent, tr("Unable to find via nodes. Please check your selection")); 79 79 return; 80 80 } 81 81 82 82 Node viaFirst = viaNodes.get(0); 83 83 Node viaLast = viaNodes.get(1); // Find middle segment … … 96 96 } 97 97 } 98 System.out.println(tr("MIddle way: {0}", middle.getId())); 99 98 System.out.println(tr("MIddle way: {0}", middle.getId())); 99 100 100 // Build relations 101 101 for (OsmPrimitive prim : selection) { … … 121 121 Command c = new SequenceCommand(tr("Create Michigan left turn restriction"), cmds); 122 122 Main.main.undoRedo.add(c); 123 cmds.clear(); 123 cmds.clear(); 124 124 } 125 125 } 126 126 127 public void incrementHashtable(Hashtable hash, Node node)127 public void incrementHashtable(Hashtable<Node, Integer> hash, Node node) 128 128 { 129 129 System.out.println(tr("Processing {0}", node.getId())); … … 137 137 hash.put(node, new Integer (1)); 138 138 } 139 139 140 140 public void buildRelation(Way fromWay, Way toWay, Node viaNode) 141 141 { 142 System.out.println(tr("Relation: from {0} to {1} via {2}", fromWay.getId(), toWay.getId(), viaNode.getId())); 143 142 System.out.println(tr("Relation: from {0} to {1} via {2}", fromWay.getId(), toWay.getId(), viaNode.getId())); 143 144 144 Relation relation = new Relation(); 145 145 146 146 RelationMember from = new RelationMember("from", fromWay); 147 147 relation.addMember(from); 148 148 149 149 RelationMember to = new RelationMember("to", toWay); 150 150 relation.addMember(to); 151 151 152 152 RelationMember via = new RelationMember("via", viaNode); 153 153 relation.addMember(via); 154 154 155 155 relation.put("type", "restriction"); 156 156 relation.put("restriction", "no_left_turn"); 157 157 158 158 cmds.add(new AddCommand(relation)); 159 } 159 } 160 160 161 161 } -
applications/editors/josm/plugins/openstreetbugs/build.xml
r17872 r18071 26 26 <attribute name="Plugin-Description" value="Imports issues from OpenStreetBugs"/> 27 27 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/OpenStreetBugs"/> 28 <attribute name="Plugin-Mainversion" value="22 19"/>28 <attribute name="Plugin-Mainversion" value="2264"/> 29 29 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> 30 30 </manifest> -
applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/OsbLayer.java
r17534 r18071 220 220 } 221 221 // prefer already selected node when multiple nodes on one point 222 else if(minDistanceSq == dist && n.isSelected() && !minPrimitive.isSelected())222 else if(minDistanceSq == dist && data.isSelected(n) && !data.isSelected(minPrimitive)) 223 223 { 224 224 minPrimitive = n;
Note:
See TracChangeset
for help on using the changeset viewer.