Changeset 22915 in osm for applications/editors/josm/plugins/czechaddress/src
- Timestamp:
- 2010-09-01T13:27:48+02:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/CzechAddressPlugin.java
r19621 r22915 50 50 * 51 51 * @author Radomír Černoch, radomir.cernoch@gmail.com 52 * @author Libor Pechacek, lpechacek@gmx.com 52 53 */ 53 54 public class CzechAddressPlugin extends Plugin implements StatusListener { … … 150 151 reasoner.update(street); 151 152 152 for (OsmPrimitive prim : Main.main.getCurrentDataSet().allPrimitives()) { 153 if (House.isMatchable(prim) || Street.isMatchable(prim)) 154 reasoner.update(prim); 153 org.openstreetmap.josm.data.osm.DataSet dataSet = Main.main.getCurrentDataSet(); 154 if (dataSet != null) { 155 for (OsmPrimitive prim : dataSet.allPrimitives()) { 156 if (House.isMatchable(prim) || Street.isMatchable(prim)) 157 reasoner.update(prim); 158 } 155 159 } 156 160 reasoner.closeTransaction(); -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/actions/PointManipulatorAction.java
r16750 r22915 43 43 */ 44 44 public void actionPerformed(ActionEvent e) { 45 Collection<OsmPrimitive> data = Main.main.getCurrentDataSet().getSelected(); 45 org.openstreetmap.josm.data.osm.DataSet dataSet = Main.main.getCurrentDataSet(); 46 if (dataSet == null) return; 47 Collection<OsmPrimitive> data = dataSet.getSelected(); 46 48 47 49 if (data.size() != 1) return; -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/LocationSelector.java
r22813 r22915 87 87 88 88 BoundingXYVisitor visitor = new BoundingXYVisitor(); 89 for (OsmPrimitive op : Main.main.getCurrentDataSet().allPrimitives()) { 89 org.openstreetmap.josm.data.osm.DataSet dataSet = Main.main.getCurrentDataSet(); 90 if (dataSet == null) return; 91 92 for (OsmPrimitive op : dataSet.allPrimitives()) { 90 93 if (op instanceof Node) { 91 94 ((Node) op).visit(visitor); -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/ManagerDialog.form
r16744 r22915 50 50 <Group type="103" groupAlignment="0" attributes="0"> 51 51 <Group type="102" alignment="1" attributes="0"> 52 <EmptySpace pref="26 7" max="32767" attributes="0"/>52 <EmptySpace pref="260" max="32767" attributes="0"/> 53 53 <Component id="renamerButton" min="-2" max="-2" attributes="0"/> 54 54 <EmptySpace max="-2" attributes="0"/> 55 55 </Group> 56 <Component id="streetScrollPane" alignment="0" pref="42 6" max="32767" attributes="0"/>56 <Component id="streetScrollPane" alignment="0" pref="422" max="32767" attributes="0"/> 57 57 </Group> 58 58 </DimensionLayout> … … 60 60 <Group type="103" groupAlignment="0" attributes="0"> 61 61 <Group type="102" alignment="1" attributes="0"> 62 <Component id="streetScrollPane" pref="3 42" max="32767" attributes="0"/>62 <Component id="streetScrollPane" pref="334" max="32767" attributes="0"/> 63 63 <EmptySpace max="-2" attributes="0"/> 64 64 <Component id="renamerButton" min="-2" max="-2" attributes="0"/> … … 114 114 <DimensionLayout dim="0"> 115 115 <Group type="103" groupAlignment="0" attributes="0"> 116 <Component id="jScrollPane1" alignment="0" pref="42 6" max="32767" attributes="0"/>116 <Component id="jScrollPane1" alignment="0" pref="422" max="32767" attributes="0"/> 117 117 <Group type="102" alignment="1" attributes="0"> 118 <EmptySpace pref="3 63" max="32767" attributes="0"/>118 <EmptySpace pref="352" max="32767" attributes="0"/> 119 119 <Component id="dbEditButton" min="-2" max="-2" attributes="0"/> 120 120 <EmptySpace max="-2" attributes="0"/> … … 125 125 <Group type="103" groupAlignment="0" attributes="0"> 126 126 <Group type="102" alignment="1" attributes="0"> 127 <Component id="jScrollPane1" pref="3 42" max="32767" attributes="0"/>127 <Component id="jScrollPane1" pref="334" max="32767" attributes="0"/> 128 128 <EmptySpace max="-2" attributes="0"/> 129 129 <Component id="dbEditButton" min="-2" max="-2" attributes="0"/> -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/ManagerDialog.java
r18409 r22915 32 32 * 33 33 * @author Radomír Černoch radomir.cernoch@gmail.com 34 * @author Libor Pechacek, lpechacek@gmx.com 34 35 */ 35 36 public class ManagerDialog extends ExtendedDialog { … … 46 47 dbEditButton.setIcon(ImageProvider.get("actions", "edit.png")); 47 48 48 Capitalizator cap = new Capitalizator( 49 Main.main.getCurrentDataSet().allPrimitives(), 50 CzechAddressPlugin.getLocation().getStreets()); 51 52 for (Street capStreet : cap.getCapitalised()) { 53 assert cap.translate(capStreet).get("name") != null : capStreet; 54 55 String elemName = capStreet.getName(); 56 String primName = cap.translate(capStreet).get("name"); 57 58 if (!elemName.equals(primName)) { 59 streetModel.elems.add(capStreet); 60 streetModel.names.add(primName); 49 org.openstreetmap.josm.data.osm.DataSet dataSet = Main.main.getCurrentDataSet(); 50 if (dataSet != null) { 51 Capitalizator cap = new Capitalizator(dataSet.allPrimitives(), 52 CzechAddressPlugin.getLocation().getStreets()); 53 54 for (Street capStreet : cap.getCapitalised()) { 55 assert cap.translate(capStreet).get("name") != null : capStreet; 56 57 String elemName = capStreet.getName(); 58 String primName = cap.translate(capStreet).get("name"); 59 60 if (!elemName.equals(primName)) { 61 streetModel.elems.add(capStreet); 62 streetModel.names.add(primName); 63 } 61 64 } 62 65 }
Note:
See TracChangeset
for help on using the changeset viewer.