Changeset 33029 in osm
- Timestamp:
- 2016-10-09T04:25:04+02:00 (8 years ago)
- Location:
- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress
- Files:
-
- 29 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/Preferences.java
r32566 r33029 135 135 }); 136 136 137 javax.swing.GroupLayout mainPanelLayout = new GroupLayout(mainPanel);137 GroupLayout mainPanelLayout = new GroupLayout(mainPanel); 138 138 mainPanel.setLayout(mainPanelLayout); 139 139 mainPanelLayout.setHorizontalGroup( 140 mainPanelLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING)140 mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) 141 141 .addGroup(mainPanelLayout.createSequentialGroup() 142 .addGroup(mainPanelLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING)142 .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) 143 143 .addGroup(mainPanelLayout.createSequentialGroup() 144 144 .addGap(12, 12, 12) 145 .addComponent(optimizeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))145 .addComponent(optimizeComboBox, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) 146 146 .addComponent(jLabel2) 147 .addComponent(addNewTagCheckBox, javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE)147 .addComponent(addNewTagCheckBox, GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE) 148 148 .addGroup(mainPanelLayout.createSequentialGroup() 149 149 .addGap(12, 12, 12) 150 .addComponent(addNewTagKeyField, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)150 .addComponent(addNewTagKeyField, GroupLayout.PREFERRED_SIZE, 120, GroupLayout.PREFERRED_SIZE) 151 151 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 152 152 .addComponent(jLabel1) 153 153 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 154 .addComponent(addNewTagValueField, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE)155 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 121, javax.swing.GroupLayout.PREFERRED_SIZE))156 .addComponent(buildingCheckBox, javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE))154 .addComponent(addNewTagValueField, GroupLayout.PREFERRED_SIZE, 125, GroupLayout.PREFERRED_SIZE) 155 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 121, GroupLayout.PREFERRED_SIZE)) 156 .addComponent(buildingCheckBox, GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE)) 157 157 .addContainerGap()) 158 158 ); 159 159 mainPanelLayout.setVerticalGroup( 160 mainPanelLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING)160 mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) 161 161 .addGroup(mainPanelLayout.createSequentialGroup() 162 162 .addComponent(jLabel2) 163 163 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 164 .addComponent(optimizeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)164 .addComponent(optimizeComboBox, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) 165 165 .addGap(18, 18, 18) 166 166 .addComponent(addNewTagCheckBox) 167 167 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 168 .addGroup(mainPanelLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.BASELINE)169 .addComponent(addNewTagKeyField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)168 .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE) 169 .addComponent(addNewTagKeyField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) 170 170 .addComponent(jLabel1) 171 .addComponent(addNewTagValueField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))171 .addComponent(addNewTagValueField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) 172 172 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) 173 173 .addComponent(buildingCheckBox) -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/PrimUtils.java
r32566 r33029 13 13 public class PrimUtils { 14 14 15 // CHECKSTYLE.OFF: SingleSpaceSeparator 15 16 public static final String KEY_HIGHWAY = "highway"; 16 17 public static final String KEY_PLACE = "place"; … … 24 25 public static final String KEY_IS_IN = "is_in"; 25 26 public static final String KEY_NAME = "name"; 26 27 // CHECKSTYLE.ON: SingleSpaceSeparator 27 28 28 29 private static final String[] keysToCompare = new String[] … … 57 58 }; 58 59 60 private PrimUtils() { 61 // Hide default constructor for utilities classes 62 } 59 63 } -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/AddressElement.java
r32566 r33029 199 199 public static int matchField(String elemValue, String primValue) { 200 200 201 if (elemValue == null) return 201 if (elemValue == null) return 0; 202 202 if (primValue == null) return -1; 203 203 … … 273 273 switch (minVal * maxVal) { 274 274 case -1 : return Reasoner.MATCH_CONFLICT; 275 case 275 case 0 : return Reasoner.MATCH_PARTIAL; 276 276 case +1 : return Reasoner.MATCH_ROCKSOLID; 277 277 } -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/ElementWithHouses.java
r32566 r33029 33 33 */ 34 34 public void addHouses(List<House> housesToAdd) { 35 for (House houseToAdd : housesToAdd) 35 for (House houseToAdd : housesToAdd) { 36 36 addHouse(houseToAdd); 37 } 37 38 } 38 39 … … 42 43 public void setHouses(List<House> houses) { 43 44 this.houses = houses; 44 for (House house : this.houses) 45 for (House house : this.houses) { 45 46 house.setParent(this); 47 } 46 48 } 47 49 -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/House.java
r32566 r33029 225 225 */ 226 226 public static boolean isMatchable(OsmPrimitive prim) { 227 for (String key : prim.keySet()) 227 for (String key : prim.keySet()) { 228 228 if (key.startsWith("addr:")) 229 229 return true; 230 } 230 231 return false; 231 232 } -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/Region.java
r32566 r33029 28 28 public void setViToCis(ArrayList<ViToCi> municipalities) { 29 29 this.vitocis = municipalities; 30 for (ViToCi obec : municipalities) 30 for (ViToCi obec : municipalities) { 31 31 obec.setParent(this); 32 } 32 33 } 33 34 … … 45 46 viToCiName = viToCiName.toUpperCase(); 46 47 47 for (ViToCi vitoci : vitocis) 48 for (ViToCi vitoci : vitocis) { 48 49 if (vitoci.getName().toUpperCase().equals(name)) 49 50 return vitoci; 51 } 50 52 51 53 return null; -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/Street.java
r32566 r33029 16 16 * @author Radomír Černoch radomir.cernoch@gmail.com 17 17 */ 18 public class Street extends ElementWithHouses 18 public class Street extends ElementWithHouses { 19 19 20 20 public Street(String name) { -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/Suburb.java
r32566 r33029 17 17 18 18 public static boolean isMatchable(OsmPrimitive prim) { 19 for (String key : prim.keySet()) 19 for (String key : prim.keySet()) { 20 20 if (key.equals(PrimUtils.KEY_PLACE)) 21 21 return true; 22 } 22 23 return false; 23 24 } -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/ViToCi.java
r32566 r33029 33 33 */ 34 34 public void addSuburbs(List<Suburb> suburbsToAdd) { 35 for (Suburb suburbToAdd : suburbsToAdd) 35 for (Suburb suburbToAdd : suburbsToAdd) { 36 36 addSuburb(suburbToAdd); 37 } 37 38 } 38 39 … … 50 51 suburbName = suburbName.toUpperCase(); 51 52 52 for (Suburb suburb : suburbs) 53 for (Suburb suburb : suburbs) { 53 54 if (suburb.getName().toUpperCase().equals(suburbName)) 54 55 return suburb; 56 } 55 57 56 58 return null; … … 60 62 public List<Street> getAllStreets() { 61 63 List<Street> result = super.getAllStreets(); 62 for (Suburb suburb : suburbs) 64 for (Suburb suburb : suburbs) { 63 65 result.addAll(suburb.getAllStreets()); 66 } 64 67 return result; 65 68 } … … 68 71 public List<House> getAllHouses() { 69 72 List<House> result = super.getAllHouses(); 70 for (Suburb suburb : suburbs) 73 for (Suburb suburb : suburbs) { 71 74 result.addAll(suburb.getAllHouses()); 75 } 72 76 return result; 73 77 } -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/ConflictResolver.java
r32566 r33029 357 357 ListDataEvent.INTERVAL_ADDED, 358 358 -index-1, -index-1); 359 for (ListDataListener listener : listeners) 359 for (ListDataListener listener : listeners) { 360 360 listener.intervalAdded(evt); 361 } 361 362 362 363 if (mainField.getSelectedItem() == null) … … 376 377 ListDataEvent.INTERVAL_ADDED, 377 378 -index-1 + elements.size(), -index-1 + elements.size()); 378 for (ListDataListener listener : listeners) 379 for (ListDataListener listener : listeners) { 379 380 listener.intervalAdded(evt); 381 } 380 382 381 383 if (mainField.getSelectedItem() == null) … … 399 401 ListDataEvent.INTERVAL_REMOVED, 400 402 index, index); 401 for (ListDataListener listener : listeners) 403 for (ListDataListener listener : listeners) { 402 404 listener.intervalRemoved(evt); 405 } 403 406 } 404 407 } … … 419 422 ListDataEvent.INTERVAL_REMOVED, 420 423 index + elements.size(), index + elements.size()); 421 for (ListDataListener listener : listeners) 424 for (ListDataListener listener : listeners) { 422 425 listener.intervalRemoved(evt); 426 } 423 427 } 424 428 } -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/FactoryDialog.java
r32566 r33029 119 119 public void setSelectedHouse(House house) { 120 120 121 for (int i = 0; i < streetModel.getSize(); i++) 121 for (int i = 0; i < streetModel.getSize(); i++) { 122 122 if (streetModel.getElementAt(i) == house.getParent()) { 123 123 streetComboBox.setSelectedIndex(i); … … 125 125 break; 126 126 } 127 128 for (int i = 0; i < houseModel.getSize(); i++) 127 } 128 129 for (int i = 0; i < houseModel.getSize(); i++) { 129 130 if (houseModel.getElementAt(i) == house) { 130 131 houseList.setSelectedIndex(i); … … 132 133 break; 133 134 } 135 } 134 136 } 135 137 … … 233 235 234 236 Street selectedStreet = null; 235 for (Street street : CzechAddressPlugin.getLocation().getStreets()) 237 for (Street street : CzechAddressPlugin.getLocation().getStreets()) { 236 238 if (street.getName().toUpperCase().equals(streetName.toUpperCase())) { 237 239 selectedStreet = street; 238 240 break; 239 241 } 242 } 240 243 241 244 if (selectedStreet == null) return; -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/GroupManipulatorDialog.java
r32566 r33029 5 5 import java.awt.event.KeyEvent; 6 6 7 import javax.swing.GroupLayout; 7 8 import javax.swing.tree.TreePath; 8 9 … … 135 136 jScrollPane1.setViewportView(proposalTree); 136 137 137 javax.swing.GroupLayout mainPanelLayout = new javax.swing.GroupLayout(mainPanel);138 GroupLayout mainPanelLayout = new GroupLayout(mainPanel); 138 139 mainPanel.setLayout(mainPanelLayout); 139 140 mainPanelLayout.setHorizontalGroup( 140 mainPanelLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING)141 mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) 141 142 .addGroup(mainPanelLayout.createSequentialGroup() 142 143 .addComponent(locationLabel) 143 144 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 144 .addComponent(locationTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 379, Short.MAX_VALUE)145 .addComponent(locationTextField, GroupLayout.DEFAULT_SIZE, 379, Short.MAX_VALUE) 145 146 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 146 147 .addComponent(locationChangeButton)) 147 .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 482, Short.MAX_VALUE)148 .addComponent(jScrollPane1, GroupLayout.DEFAULT_SIZE, 482, Short.MAX_VALUE) 148 149 .addGroup(mainPanelLayout.createSequentialGroup() 149 150 .addContainerGap() 150 .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, 458, Short.MAX_VALUE)151 .addComponent(jLabel3, GroupLayout.DEFAULT_SIZE, 458, Short.MAX_VALUE) 151 152 .addContainerGap()) 152 153 ); 153 154 mainPanelLayout.setVerticalGroup( 154 mainPanelLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING)155 mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) 155 156 .addGroup(mainPanelLayout.createSequentialGroup() 156 .addGroup(mainPanelLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.BASELINE)157 .addComponent(locationTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)157 .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE) 158 .addComponent(locationTextField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) 158 159 .addComponent(locationChangeButton) 159 160 .addComponent(locationLabel)) 160 161 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 161 .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 223, Short.MAX_VALUE)162 .addComponent(jScrollPane1, GroupLayout.DEFAULT_SIZE, 223, Short.MAX_VALUE) 162 163 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 163 164 .addComponent(jLabel3)) -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/LocationSelector.java
r32566 r33029 81 81 private void initLocationHints() { 82 82 boolean assertions = false; 83 assert 83 assert assertions = true; 84 84 85 85 OsmPrimitive bestFit = null; … … 151 151 hlRegions.add(oblast); 152 152 hlViToCis.add(obec); 153 for (Suburb castObce : obec.getSuburbs()) 153 for (Suburb castObce : obec.getSuburbs()) { 154 154 if (castObce.getName().equalsIgnoreCase(bestFit.get("name"))) 155 155 hlSuburbs.add(castObce); 156 } 156 157 } 157 158 } else { … … 176 177 int curHlIndex = 0; 177 178 178 for (int i = 0; i < list.getSize(); i++) 179 for (int i = 0; i < list.getSize(); i++) { 179 180 for (int j = 0; j < hlList.size(); j++) { 180 181 E t = list.getElementAt(i); … … 185 186 } 186 187 } 188 } 187 189 188 190 return curHlIndex; … … 315 317 if (obec.getSuburbs().size() > 0) { 316 318 ElementWithStreets[] suburbs = new ElementWithStreets[obec.getSuburbs().size() + 1]; 317 for (int i = 0; i < obec.getSuburbs().size(); i++) 319 for (int i = 0; i < obec.getSuburbs().size(); i++) { 318 320 suburbs[i] = obec.getSuburbs().get(i); 321 } 319 322 suburbs[obec.getSuburbs().size()] = obec; 320 323 DefaultComboBoxModel<ElementWithStreets> suburbsList = new DefaultComboBoxModel<>(suburbs); -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/PointManipulatorDialog.java
r32566 r33029 9 9 import javax.swing.AbstractAction; 10 10 import javax.swing.Action; 11 import javax.swing.GroupLayout; 11 12 import javax.swing.Timer; 12 13 … … 41 42 public class PointManipulatorDialog extends ExtendedDialog implements StatusListener { 42 43 43 private Timer 44 private Timer updateMatchesTimer = null; 44 45 private Action updateMatchesAction; 45 46 private ProposalContainer proposalContainer; … … 277 278 mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 278 279 .addGroup(mainPanelLayout.createSequentialGroup() 279 .addGroup(mainPanelLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.BASELINE)280 .addComponent(locationEdit, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)280 .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE) 281 .addComponent(locationEdit, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) 281 282 .addComponent(jLabel5) 282 283 .addComponent(changeLocationButton)) 283 284 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 284 .addGroup(mainPanelLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.BASELINE)285 .addComponent(alternateNumberEdit, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)285 .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE) 286 .addComponent(alternateNumberEdit, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) 286 287 .addComponent(jLabel1)) 287 288 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 288 .addGroup(mainPanelLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.BASELINE)289 .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE) 289 290 .addComponent(jLabel6) 290 .addComponent(matchesComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))291 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 292 .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 153, Short.MAX_VALUE)291 .addComponent(matchesComboBox, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) 292 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 293 .addComponent(jScrollPane1, GroupLayout.DEFAULT_SIZE, 153, Short.MAX_VALUE) 293 294 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 294 295 .addComponent(statusLabel)) … … 313 314 private void proposalListKeyReleased(java.awt.event.KeyEvent evt) { //GEN-FIRST:event_proposalListKeyReleased 314 315 if (evt.getKeyCode() == KeyEvent.VK_DELETE) { 315 for (Object o : proposalList.getSelectedValuesList()) 316 for (Object o : proposalList.getSelectedValuesList()) { 316 317 proposalContainer.removeProposal((Proposal) o); 318 } 317 319 } 318 320 } //GEN-LAST:event_proposalListKeyReleased -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/databaseeditors/EditorFactory.java
r32566 r33029 38 38 r.openTransaction(); 39 39 street.setName(dialog.getStreetName()); 40 for (House house : street.getHouses()) 40 for (House house : street.getHouses()) { 41 41 r.update(house); 42 } 42 43 r.update(street); 43 44 r.closeTransaction(); -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/databaseeditors/HouseEditor.java
r32566 r33029 2 2 package org.openstreetmap.josm.plugins.czechaddress.gui.databaseeditors; 3 3 4 import javax.swing.GroupLayout; 4 5 import javax.swing.JButton; 5 6 import javax.swing.JLabel; … … 115 116 ); 116 117 mainPanelLayout.setVerticalGroup( 117 mainPanelLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING)118 mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) 118 119 .addGroup(mainPanelLayout.createSequentialGroup() 119 .addGroup(mainPanelLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.BASELINE)120 .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE) 120 121 .addComponent(jLabel1) 121 .addComponent(parentField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)122 .addComponent(parentField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) 122 123 .addComponent(parentEditButton)) 123 124 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 124 .addGroup(mainPanelLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.BASELINE)125 .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE) 125 126 .addComponent(jLabel2) 126 .addComponent(cpField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)127 .addComponent(cpField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) 127 128 .addComponent(jLabel3) 128 .addComponent(coField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))129 .addComponent(coField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) 129 130 .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 130 131 ); -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/databaseeditors/StreetEditor.java
r32566 r33029 3 3 4 4 import javax.swing.DefaultComboBoxModel; 5 import javax.swing.GroupLayout; 5 6 6 7 import org.openstreetmap.josm.Main; … … 113 114 }); 114 115 115 javax.swing.GroupLayout mainPanelLayout = new javax.swing.GroupLayout(mainPanel);116 GroupLayout mainPanelLayout = new GroupLayout(mainPanel); 116 117 mainPanel.setLayout(mainPanelLayout); 117 118 mainPanelLayout.setHorizontalGroup( 118 mainPanelLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING)119 mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) 119 120 .addGroup(mainPanelLayout.createSequentialGroup() 120 .addGroup(mainPanelLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.TRAILING)121 .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.TRAILING) 121 122 .addComponent(jLabel2) 122 123 .addComponent(jLabel3) 123 124 .addComponent(jLabel1)) 124 125 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 125 .addGroup(mainPanelLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.TRAILING)126 .addComponent(nameField, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 344, Short.MAX_VALUE)127 .addGroup( javax.swing.GroupLayout.Alignment.LEADING, mainPanelLayout.createSequentialGroup()128 .addComponent(parentField, javax.swing.GroupLayout.DEFAULT_SIZE, 310, Short.MAX_VALUE)126 .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.TRAILING) 127 .addComponent(nameField, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 344, Short.MAX_VALUE) 128 .addGroup(GroupLayout.Alignment.LEADING, mainPanelLayout.createSequentialGroup() 129 .addComponent(parentField, GroupLayout.DEFAULT_SIZE, 310, Short.MAX_VALUE) 129 130 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 130 131 .addComponent(parentEditButton)) 131 .addGroup( javax.swing.GroupLayout.Alignment.LEADING, mainPanelLayout.createSequentialGroup()132 .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 308, javax.swing.GroupLayout.PREFERRED_SIZE)132 .addGroup(GroupLayout.Alignment.LEADING, mainPanelLayout.createSequentialGroup() 133 .addComponent(jScrollPane1, GroupLayout.PREFERRED_SIZE, 308, GroupLayout.PREFERRED_SIZE) 133 134 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 134 135 .addComponent(houseEditButton) … … 136 137 ); 137 138 mainPanelLayout.setVerticalGroup( 138 mainPanelLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING)139 mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) 139 140 .addGroup(mainPanelLayout.createSequentialGroup() 140 .addGroup(mainPanelLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.BASELINE)141 .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE) 141 142 .addComponent(jLabel1) 142 .addComponent(parentField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)143 .addComponent(parentField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) 143 144 .addComponent(parentEditButton)) 144 145 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 145 .addGroup(mainPanelLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.BASELINE)146 .addComponent(nameField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)146 .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE) 147 .addComponent(nameField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) 147 148 .addComponent(jLabel2)) 148 149 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 149 .addGroup(mainPanelLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING)150 .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) 150 151 .addComponent(jLabel3) 151 152 .addComponent(houseEditButton) 152 .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE))153 .addContainerGap( javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))153 .addComponent(jScrollPane1, GroupLayout.PREFERRED_SIZE, 77, GroupLayout.PREFERRED_SIZE)) 154 .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 154 155 ); 155 156 -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/databaseeditors/SuburbEditor.java
r32566 r33029 3 3 4 4 import javax.swing.DefaultComboBoxModel; 5 import javax.swing.GroupLayout; 5 6 6 7 import org.openstreetmap.josm.Main; … … 144 145 jLabel4.setText("Ulice:"); 145 146 146 javax.swing.GroupLayout mainPanelLayout = new javax.swing.GroupLayout(mainPanel);147 GroupLayout mainPanelLayout = new GroupLayout(mainPanel); 147 148 mainPanel.setLayout(mainPanelLayout); 148 149 mainPanelLayout.setHorizontalGroup( 149 mainPanelLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING)150 mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) 150 151 .addGroup(mainPanelLayout.createSequentialGroup() 151 .addGroup(mainPanelLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING)152 .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) 152 153 .addComponent(jLabel4) 153 154 .addComponent(jLabel3) … … 155 156 .addComponent(jLabel1)) 156 157 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 157 .addGroup(mainPanelLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING)158 .addGroup(mainPanelLayout.createSequentialGroup() 159 .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 330, Short.MAX_VALUE)158 .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) 159 .addGroup(mainPanelLayout.createSequentialGroup() 160 .addComponent(jScrollPane2, GroupLayout.DEFAULT_SIZE, 330, Short.MAX_VALUE) 160 161 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 161 162 .addComponent(streetEditButton)) 162 163 .addGroup(mainPanelLayout.createSequentialGroup() 163 .addComponent(parentField, javax.swing.GroupLayout.DEFAULT_SIZE, 330, Short.MAX_VALUE)164 .addComponent(parentField, GroupLayout.DEFAULT_SIZE, 330, Short.MAX_VALUE) 164 165 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 165 166 .addComponent(parentEditButton)) 166 .addGroup( javax.swing.GroupLayout.Alignment.TRAILING, mainPanelLayout.createSequentialGroup()167 .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 330, Short.MAX_VALUE)167 .addGroup(GroupLayout.Alignment.TRAILING, mainPanelLayout.createSequentialGroup() 168 .addComponent(jScrollPane1, GroupLayout.DEFAULT_SIZE, 330, Short.MAX_VALUE) 168 169 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 169 170 .addComponent(houseEditButton)) 170 .addComponent(nameField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 364, Short.MAX_VALUE)))171 .addComponent(nameField, GroupLayout.Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 364, Short.MAX_VALUE))) 171 172 ); 172 173 mainPanelLayout.setVerticalGroup( 173 mainPanelLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING)174 mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) 174 175 .addGroup(mainPanelLayout.createSequentialGroup() 175 .addGroup(mainPanelLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING)176 .addGroup(mainPanelLayout.createSequentialGroup() 177 .addGroup(mainPanelLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.BASELINE)178 .addComponent(parentField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)176 .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) 177 .addGroup(mainPanelLayout.createSequentialGroup() 178 .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE) 179 .addComponent(parentField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) 179 180 .addComponent(parentEditButton) 180 181 .addComponent(jLabel1)) 181 182 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 182 .addGroup(mainPanelLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.BASELINE)183 .addComponent(nameField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)183 .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE) 184 .addComponent(nameField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) 184 185 .addComponent(jLabel2)) 185 186 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 186 .addGroup(mainPanelLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING)187 .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) 187 188 .addComponent(houseEditButton) 188 .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)))189 .addComponent(jScrollPane1, GroupLayout.PREFERRED_SIZE, 77, GroupLayout.PREFERRED_SIZE))) 189 190 .addGroup(mainPanelLayout.createSequentialGroup() 190 191 .addGap(66, 66, 66) 191 192 .addComponent(jLabel3))) 192 193 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 193 .addGroup(mainPanelLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING)194 .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) 194 195 .addComponent(jLabel4) 195 196 .addComponent(streetEditButton) 196 .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE))197 .addContainerGap( javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))197 .addComponent(jScrollPane2, GroupLayout.PREFERRED_SIZE, 77, GroupLayout.PREFERRED_SIZE)) 198 .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 198 199 ); 199 200 -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/utils/HalfCookedComboBoxModel.java
r32566 r33029 36 36 ListDataEvent.CONTENTS_CHANGED, 0, getSize()-1); 37 37 38 for (ListDataListener l : listeners) 38 for (ListDataListener l : listeners) { 39 39 l.contentsChanged(evt); 40 } 40 41 } 41 42 } -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/utils/HalfCookedListModel.java
r32566 r33029 36 36 ListDataEvent.CONTENTS_CHANGED, 0, getSize()-1); 37 37 38 for (ListDataListener l : listeners) 38 for (ListDataListener l : listeners) { 39 39 l.contentsChanged(evt); 40 } 40 41 } 41 42 } -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/utils/HalfCookedTreeModel.java
r32566 r33029 53 53 TreeModelEvent evt = new TreeModelEvent(this, new Object[] {root}); 54 54 55 for (TreeModelListener l : listeneres) 55 for (TreeModelListener l : listeneres) { 56 56 l.treeNodesChanged(evt); 57 } 57 58 } 58 59 } -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/utils/UniversalRenderer.java
r32566 r33029 23 23 */ 24 24 public abstract class UniversalRenderer { 25 private static final ImageIcon iconAdd 26 private static final ImageIcon iconEdit 25 private static final ImageIcon iconAdd = ImageProvider.get("actions", "add.png"); 26 private static final ImageIcon iconEdit = ImageProvider.get("actions", "edit.png"); 27 27 private static final ImageIcon iconRemove = ImageProvider.get("actions", "remove.png"); 28 28 29 private static final ImageIcon nodeIcon 30 private static final ImageIcon wayIcon 31 private static final ImageIcon relationIcon 29 private static final ImageIcon nodeIcon = ImageProvider.get("data/node.png"); 30 private static final ImageIcon wayIcon = ImageProvider.get("data/way.png"); 31 private static final ImageIcon relationIcon = ImageProvider.get("data/relation.png"); 32 32 33 33 private static final ImageIcon envelopeNormIcon = ImageProvider.get("envelope-closed-small.png"); … … 37 37 public static ImageIcon getIcon(Object value) { 38 38 39 if (value instanceof AddKeyValueProposal) 39 if (value instanceof AddKeyValueProposal) return iconAdd; 40 40 else if (value instanceof KeyValueChangeProposal) return iconEdit; 41 else if (value instanceof RemoveKeyProposal) 41 else if (value instanceof RemoveKeyProposal) return iconRemove; 42 42 43 43 if (value instanceof House) { -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/intelligence/Reasoner.java
r32566 r33029 85 85 transactionOpened = false; 86 86 87 for (ReasonerListener listener : listeners) 87 for (ReasonerListener listener : listeners) { 88 88 listener.resonerReseted(); 89 } 89 90 } 90 91 … … 129 130 130 131 Set<AddressElement> elemChanges = new HashSet<>(); 131 Set<OsmPrimitive> 132 Set<OsmPrimitive> primChanges = new HashSet<>(); 132 133 133 134 for (OsmPrimitive prim : primToUpdate) { … … 172 173 173 174 for (ReasonerListener listener : listeners) { 174 for (AddressElement elem : elemToUpdate) 175 for (AddressElement elem : elemToUpdate) { 175 176 if (elem != null) 176 177 listener.elementChanged(elem); 177 178 for (OsmPrimitive prim : primToUpdate) 178 } 179 180 for (OsmPrimitive prim : primToUpdate) { 179 181 if (prim != null) 180 182 listener.primitiveChanged(prim); 183 } 181 184 } 182 185 … … 210 213 } 211 214 212 for (AddressElement elem : elemMatchIndex.keySet()) 215 for (AddressElement elem : elemMatchIndex.keySet()) { 213 216 reconsider(prim, elem); 217 } 214 218 } 215 219 … … 238 242 } 239 243 240 for (OsmPrimitive prim : primMatchIndex.keySet()) 244 for (OsmPrimitive prim : primMatchIndex.keySet()) { 241 245 reconsider(prim, elem); 246 } 242 247 } 243 248 … … 629 634 public Set<AddressElement> getUnassignedElements() { 630 635 Set<AddressElement> result = new HashSet<>(); 631 for (AddressElement elem : elemMatchIndex.keySet()) 636 for (AddressElement elem : elemMatchIndex.keySet()) { 632 637 if (translate(elem) == null) 633 638 result.add(elem); 639 } 634 640 return result; 635 641 } … … 640 646 public Set<OsmPrimitive> getUnassignedPrimitives() { 641 647 Set<OsmPrimitive> result = new HashSet<>(); 642 for (OsmPrimitive prim : primMatchIndex.keySet()) 648 for (OsmPrimitive prim : primMatchIndex.keySet()) { 643 649 if (translate(prim) == null) 644 650 result.add(prim); 651 } 645 652 return result; 646 653 } -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/intelligence/SelectionMonitor.java
r32566 r33029 43 43 synchronized (r) { 44 44 r.openTransaction(); 45 for (OsmPrimitive selectedPrim :newSelection) 45 for (OsmPrimitive selectedPrim :newSelection) { 46 46 if (House.isMatchable(selectedPrim) || Street.isMatchable(selectedPrim)) 47 47 r.update(selectedPrim); 48 for (OsmPrimitive selectedPrim :lastSelection) 48 } 49 for (OsmPrimitive selectedPrim :lastSelection) { 49 50 if (House.isMatchable(selectedPrim) || Street.isMatchable(selectedPrim)) 50 51 r.update(selectedPrim); 52 } 51 53 r.closeTransaction(); 52 54 } 53 55 54 56 lastSelection.clear(); 55 for (OsmPrimitive prim : newSelection) 57 for (OsmPrimitive prim : newSelection) { 56 58 lastSelection.add(prim); 59 } 57 60 } 58 61 } -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/parser/MvcrParser.java
r32566 r33029 52 52 return; 53 53 54 ElementWithHouses 54 ElementWithHouses topElem = curStreet; 55 55 if (topElem == null) topElem = curSuburb; 56 56 if (topElem == null) topElem = curViToCi; … … 71 71 } 72 72 73 ElementWithStreets 73 ElementWithStreets topElem = curSuburb; 74 74 if (topElem == null) topElem = curViToCi; 75 75 if (topElem == null) topElem = curRegion; … … 243 243 * non-systematic solution. 244 244 */ 245 for (String oldUrl : OLD_URLS) 245 for (String oldUrl : OLD_URLS) { 246 246 if (Main.pref.get(URL_PREFERENCES_KEY, URL_DEFAULT).equals(oldUrl)) { 247 247 Main.pref.put(URL_PREFERENCES_KEY, URL_DEFAULT); 248 248 break; 249 249 } 250 } 250 251 251 252 return Main.pref.get(URL_PREFERENCES_KEY, URL_DEFAULT); -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/proposal/ExtractAddressIntoNodeProposal.java
r32566 r33029 61 61 Node addrNode = new Node(visitor.getBounds().getCenter()); 62 62 63 for (String key : way.keySet()) 63 for (String key : way.keySet()) { 64 64 if (key.startsWith("addr")) 65 65 addrNode.put(key, way.get(key)); 66 } 66 67 67 for (String key : addrNode.keySet()) 68 for (String key : addrNode.keySet()) { 68 69 way.remove(key); 70 } 69 71 70 72 Main.getLayerManager().getEditDataSet().addPrimitive(addrNode); -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/proposal/ProposalContainer.java
r32566 r33029 83 83 proposals.size()-1); 84 84 85 for (ListDataListener l : listeners) 86 l.contentsChanged(evt); 85 for (ListDataListener l : listeners) { 86 l.contentsChanged(evt); 87 } 87 88 } 88 89 … … 102 103 index1, index2); 103 104 104 for (ListDataListener l : listeners) 105 l.contentsChanged(evt); 105 for (ListDataListener l : listeners) { 106 l.contentsChanged(evt); 107 } 106 108 } 107 109 … … 124 126 index, index); 125 127 126 for (ListDataListener l : listeners) 127 l.contentsChanged(evt); 128 for (ListDataListener l : listeners) { 129 l.contentsChanged(evt); 130 } 128 131 } 129 132 … … 139 142 0, proposals.size()-1); 140 143 141 for (ListDataListener l : listeners) 142 l.contentsChanged(evt); 144 for (ListDataListener l : listeners) { 145 l.contentsChanged(evt); 146 } 143 147 } 144 148 … … 161 165 proposals.clear(); 162 166 163 for (ListDataListener l : listeners) 164 l.contentsChanged(evt); 167 for (ListDataListener l : listeners) { 168 l.contentsChanged(evt); 169 } 165 170 } 166 171 … … 169 174 */ 170 175 public void applyAll() { 171 for (Proposal proposal : proposals) 176 for (Proposal proposal : proposals) { 172 177 proposal.apply(target); 178 } 173 179 } 174 180 -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/proposal/ProposalDatabase.java
r32566 r33029 124 124 */ 125 125 public void applyAll() { 126 for (ProposalContainer a : changeSet) 126 for (ProposalContainer a : changeSet) { 127 127 a.applyAll(); 128 } 128 129 } 129 130 … … 213 214 214 215 TreeModelEvent event = new TreeModelEvent(this, path); 215 for (TreeModelListener l : listeners) 216 for (TreeModelListener l : listeners) { 216 217 l.treeNodesRemoved(event); 218 } 217 219 return; 218 220 } … … 225 227 226 228 TreeModelEvent event = new TreeModelEvent(this, path); 227 for (TreeModelListener l : listeners) 229 for (TreeModelListener l : listeners) { 228 230 l.treeNodesRemoved(event); 231 } 229 232 return; 230 233 } -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/proposal/ProposalFactory.java
r32566 r33029 74 74 return new AddKeyValueProposal(key, target); 75 75 76 for (String itemRaw : current.split(",")) 77 for (String itemSplitted : itemRaw.split(";")) 76 for (String itemRaw : current.split(",")) { 77 for (String itemSplitted : itemRaw.split(";")) { 78 78 if (itemSplitted.trim().equals(target.trim())) 79 79 return null; 80 } 81 } 80 82 81 83 return new KeyValueChangeProposal(
Note:
See TracChangeset
for help on using the changeset viewer.