Changeset 17603 in osm for applications/editors/josm/plugins
- Timestamp:
- 2009-09-13T21:09:10+02:00 (15 years ago)
- Location:
- applications/editors/josm/plugins/czechaddress
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/czechaddress/build.xml
r16750 r17603 52 52 <attribute name="Plugin-Description" value="Creating and handling address nodes and buildings within Czech Republic."/> 53 53 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/Cz:JOSM/Plugins/CzechAddress"/> 54 <attribute name="Plugin-Mainversion" value=" 1815"/>54 <attribute name="Plugin-Mainversion" value="2093"/> 55 55 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> 56 56 </manifest> -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/actions/SplitAreaByEmptyWayAction.java
r16750 r17603 62 62 if (prim2.equals(prim)) continue; 63 63 Way border = (Way) prim2; 64 if (border. nodes.size() == 0) continue;64 if (border.getNodes().size() == 0) continue; 65 65 if (border.keySet().size() > 0) continue; 66 if (!area. nodes.contains(border.firstNode())) continue;67 if (!area. nodes.contains(border.lastNode())) continue;66 if (!area.getNodes().contains(border.firstNode())) continue; 67 if (!area.getNodes().contains(border.lastNode())) continue; 68 68 69 69 Way newArea1 = new Way(); … … 83 83 Main.main.getCurrentDataSet().addPrimitive(newArea2); 84 84 85 area. delete(true);86 border. delete(true);85 area.setDeleted(true); 86 border.setDeleted(true); 87 87 newSelection.remove(area); 88 88 newSelection.remove(border); … … 113 113 Way tempBorder = new Way(border); 114 114 115 int index1 = area. nodes.indexOf(tempBorder.firstNode());116 int index2 = area. nodes.indexOf(tempBorder.lastNode());115 int index1 = area.getNodes().indexOf(tempBorder.firstNode()); 116 int index2 = area.getNodes().indexOf(tempBorder.lastNode()); 117 117 if (index1 == index2) 118 118 return 1; 119 119 120 120 if (index1 > index2) { 121 Collections.reverse(tempBorder. nodes);122 index1 = area. nodes.indexOf(tempBorder.firstNode());123 index2 = area. nodes.indexOf(tempBorder.lastNode());121 Collections.reverse(tempBorder.getNodes()); 122 index1 = area.getNodes().indexOf(tempBorder.firstNode()); 123 index2 = area.getNodes().indexOf(tempBorder.lastNode()); 124 124 } 125 125 126 126 for (Relation relation : Main.main.getCurrentDataSet().relations) 127 for (RelationMember areaMember : relation. members)128 if (area.equals(areaMember. member))127 for (RelationMember areaMember : relation.getMembers()) 128 if (area.equals(areaMember.getMember())) 129 129 return 2; 130 130 … … 134 134 } 135 135 136 newArea1. nodes.addAll(area.nodes.subList(0, index1));137 newArea1. nodes.addAll(tempBorder.nodes);138 newArea1. nodes.addAll(area.nodes.subList(index2, area.nodes.size()-1));139 newArea1. nodes.add(area.nodes.get(0));136 newArea1.getNodes().addAll(area.getNodes().subList(0, index1)); 137 newArea1.getNodes().addAll(tempBorder.getNodes()); 138 newArea1.getNodes().addAll(area.getNodes().subList(index2, area.getNodes().size()-1)); 139 newArea1.getNodes().add(area.getNodes().get(0)); 140 140 141 Collections.reverse(tempBorder. nodes);142 newArea2. nodes.addAll(area.nodes.subList(index1, index2));143 newArea2. nodes.addAll(tempBorder.nodes);144 newArea2. nodes.add(area.nodes.get(index1));141 Collections.reverse(tempBorder.getNodes()); 142 newArea2.getNodes().addAll(area.getNodes().subList(index1, index2)); 143 newArea2.getNodes().addAll(tempBorder.getNodes()); 144 newArea2.getNodes().add(area.getNodes().get(index1)); 145 145 146 146 removeDuplicateNodesFromWay(newArea1); … … 155 155 void removeDuplicateNodesFromWay(Way w) { 156 156 int i=0; 157 while (i<w. nodes.size()-1) {158 if (w. nodes.get(i).equals(w.nodes.get(i+1)))159 w. nodes.remove(i);157 while (i<w.getNodes().size()-1) { 158 if (w.getNodes().get(i).equals(w.getNodes().get(i+1))) 159 w.getNodes().remove(i); 160 160 else 161 161 i++; -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/AddressElement.java
r16417 r17603 101 101 result += " " + StringUtils.latLonToString(((Way) prim).firstNode().getCoor()); 102 102 103 if (prim. deleted)103 if (prim.isDeleted()) 104 104 result += " DEL"; 105 105 -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/PointManipulatorDialog.form
r16744 r17603 44 44 <Group type="103" groupAlignment="0" attributes="0"> 45 45 <Group type="102" alignment="1" attributes="0"> 46 <Component id="locationEdit" pref="2 52" max="32767" attributes="0"/>46 <Component id="locationEdit" pref="228" max="32767" attributes="0"/> 47 47 <EmptySpace max="-2" attributes="0"/> 48 48 <Component id="changeLocationButton" min="-2" max="-2" attributes="0"/> 49 49 </Group> 50 <Component id="alternateNumberEdit" alignment="0" pref=" 309" max="32767" attributes="0"/>51 <Component id="matchesComboBox" alignment="0" pref=" 309" max="32767" attributes="0"/>50 <Component id="alternateNumberEdit" alignment="0" pref="293" max="32767" attributes="0"/> 51 <Component id="matchesComboBox" alignment="0" pref="293" max="32767" attributes="0"/> 52 52 </Group> 53 53 </Group> … … 75 75 </Group> 76 76 <EmptySpace max="-2" attributes="0"/> 77 <Component id="jScrollPane1" pref="1 61" max="32767" attributes="0"/>77 <Component id="jScrollPane1" pref="153" max="32767" attributes="0"/> 78 78 <EmptySpace max="-2" attributes="0"/> 79 79 <Component id="statusLabel" min="-2" max="-2" attributes="0"/> -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/PointManipulatorDialog.java
r16862 r17603 80 80 81 81 // And finalize initializing the form. 82 setupDialog(mainPanel, new String[] { "ok.png", "cancel.png" }); 82 setContent(mainPanel, false); 83 setButtonIcons(new String[] { "ok.png", "cancel.png" }); 84 setupDialog(); 83 85 setDefaultCloseOperation(DISPOSE_ON_CLOSE); 84 86 setAlwaysOnTop(false); … … 129 131 public void updateMatches() { 130 132 131 if (proposalContainer.getTarget(). deleted)133 if (proposalContainer.getTarget().isDeleted()) 132 134 setVisible(false); 133 135 OsmPrimitive prim = this.proposalContainer.getTarget(); … … 136 138 137 139 synchronized (r) { 138 Map<String,String> backup = prim. keys;140 Map<String,String> backup = prim.getKeys(); 139 141 r.openTransaction(); 140 142 for (AddressElement elem : r.getCandidates(prim)) 141 143 r.unOverwrite(prim, elem); 142 prim. keys = null;144 prim.setKeys(null); 143 145 prim.put(PrimUtils.KEY_ADDR_CP, alternateNumberEdit.getText()); 144 146 r.update(prim); 145 147 elems.addAll(r.getCandidates(prim)); 146 prim. keys = backup;148 prim.setKeys(backup); 147 149 r.update(prim); 148 150 r.closeTransaction(); -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/intelligence/Reasoner.java
r16417 r17603 347 347 private int evalQ(OsmPrimitive prim, AddressElement elem, Integer oldQ) { 348 348 349 if (prim. deleted)349 if (prim.isDeleted()) 350 350 return MATCH_NOMATCH; 351 351 -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/proposal/Proposal.java
r15166 r17603 23 23 */ 24 24 public void apply(OsmPrimitive op) { 25 op. modified = true;25 op.setModified(true); 26 26 } 27 27
Note:
See TracChangeset
for help on using the changeset viewer.