Ignore:
Timestamp:
2009-07-31T12:35:34+02:00 (15 years ago)
Author:
rcernoch
Message:

CzechAddress compatible with the new numbering system. Compatibility issues with JOSM also fixed.

Location:
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/CzechAddressPlugin.java

    r16601 r16744  
    147147                reasoner.update(street);
    148148
    149             for (OsmPrimitive prim : Main.main.getCurrentDataSet().allPrimitives()) {
     149            for (OsmPrimitive prim : Main.ds.allPrimitives()) {
    150150                if (House.isMatchable(prim) || Street.isMatchable(prim))
    151151                    reasoner.update(prim);
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/MapUtils.java

    r16601 r16744  
    2222     */
    2323    public static void zoomToMany(Collection<OsmPrimitive> primitives) {
    24         Main.main.getCurrentDataSet().setSelected(primitives);
     24        Main.ds.setSelected(primitives);
    2525        (new AutoScaleAction("selection")).actionPerformed(null);
    2626    }
     
    3030     */
    3131    public static void zoomTo(OsmPrimitive primitive) {
    32         Main.main.getCurrentDataSet().setSelected(primitive);
     32        Main.ds.setSelected(primitive);
    3333        (new AutoScaleAction("selection")).actionPerformed(null);
    3434    }
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/actions/FactoryAction.java

    r16601 r16744  
    107107        FactoryDialog.getInstance().selectionListenerActivated = false;
    108108        FactoryDialog.getInstance().selectNextUnmatchedHouseByCheckBox();
    109         Main.main.getCurrentDataSet().addPrimitive(newNode);
    110         Main.main.getCurrentDataSet().setSelected(newNode);
     109        Main.ds.addPrimitive(newNode);
     110        Main.ds.setSelected(newNode);
    111111        FactoryDialog.getInstance().selectionListenerActivated = true;
    112112    }
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/actions/PointManipulatorAction.java

    r16601 r16744  
    4343     */
    4444    public void actionPerformed(ActionEvent e) {
    45         Collection<OsmPrimitive> data = Main.main.getCurrentDataSet().getSelected();
     45        Collection<OsmPrimitive> data = Main.ds.getSelected();
    4646
    4747        if (data.size() != 1) return;
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/actions/SplitAreaByEmptyWayAction.java

    r16601 r16744  
    5151    public void actionPerformed(ActionEvent e) {
    5252
    53         Collection<OsmPrimitive> selectedWays = Main.main.getCurrentDataSet().getSelectedWays();
    54         Collection<OsmPrimitive> newSelection = Main.main.getCurrentDataSet().getSelected();
     53        Collection<OsmPrimitive> selectedWays = Main.ds.getSelectedWays();
     54        Collection<OsmPrimitive> newSelection = Main.ds.getSelected();
    5555
    5656        for (OsmPrimitive prim : selectedWays) {
     
    5858                Way area = (Way) prim;
    5959
    60             for (OsmPrimitive prim2 : Main.main.getCurrentDataSet().allNonDeletedPrimitives()) {
     60            for (OsmPrimitive prim2 : Main.ds.allNonDeletedPrimitives()) {
    6161                if (!(prim2 instanceof Way)) continue;
    6262                if (prim2.equals(prim))      continue;
     
    8080
    8181                if (errorCode == 0) {
    82                     Main.main.getCurrentDataSet().addPrimitive(newArea1);
    83                     Main.main.getCurrentDataSet().addPrimitive(newArea2);
     82                    Main.ds.addPrimitive(newArea1);
     83                    Main.ds.addPrimitive(newArea2);
    8484
    8585                    area.delete(true);
     
    9696        }
    9797
    98         Main.main.getCurrentDataSet().setSelected(newSelection);
     98        Main.ds.setSelected(newSelection);
    9999    }
    100100
     
    124124        }
    125125
    126         for (Relation relation : Main.main.getCurrentDataSet().relations)
     126        for (Relation relation : Main.ds.relations)
    127127            for (RelationMember areaMember : relation.members)
    128128                if (area.equals(areaMember.member))
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/LocationSelector.form

    r15582 r16744  
    4141                  <EmptySpace max="-2" attributes="0"/>
    4242                  <Group type="103" groupAlignment="1" attributes="0">
    43                       <Component id="suburbComboBox" pref="341" max="32767" attributes="0"/>
    44                       <Component id="vitociComboBox" pref="341" max="32767" attributes="0"/>
    45                       <Component id="oblastComboBox" pref="341" max="32767" attributes="0"/>
     43                      <Component id="suburbComboBox" pref="346" max="32767" attributes="0"/>
     44                      <Component id="vitociComboBox" pref="346" max="32767" attributes="0"/>
     45                      <Component id="oblastComboBox" pref="346" max="32767" attributes="0"/>
    4646                  </Group>
    4747              </Group>
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/LocationSelector.java

    r16601 r16744  
    8383
    8484        BoundingXYVisitor visitor = new BoundingXYVisitor();
    85         for (OsmPrimitive op : Main.main.getCurrentDataSet().allPrimitives()) {
     85        for (OsmPrimitive op : Main.ds.allPrimitives()) {
    8686            if (op instanceof Node) {
    8787                ((Node) op).visit(visitor);
     
    103103            System.out.println("AUTO: Center is " + center);
    104104
    105         for (OsmPrimitive op : Main.main.getCurrentDataSet().allPrimitives()) {
     105        for (OsmPrimitive op : Main.ds.allPrimitives()) {
    106106
    107107            if (!(op instanceof Node)) {
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/ManagerDialog.form

    r15582 r16744  
    5050                  <Group type="103" groupAlignment="0" attributes="0">
    5151                      <Group type="102" alignment="1" attributes="0">
    52                           <EmptySpace pref="253" max="32767" attributes="0"/>
     52                          <EmptySpace pref="267" max="32767" attributes="0"/>
    5353                          <Component id="renamerButton" min="-2" max="-2" attributes="0"/>
    5454                          <EmptySpace max="-2" attributes="0"/>
     
    116116                      <Component id="jScrollPane1" alignment="0" pref="426" max="32767" attributes="0"/>
    117117                      <Group type="102" alignment="1" attributes="0">
    118                           <EmptySpace pref="356" max="32767" attributes="0"/>
     118                          <EmptySpace pref="363" max="32767" attributes="0"/>
    119119                          <Component id="dbEditButton" min="-2" max="-2" attributes="0"/>
    120120                          <EmptySpace max="-2" attributes="0"/>
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/ManagerDialog.java

    r16601 r16744  
    4747
    4848        Capitalizator cap = new Capitalizator(
    49                                 Main.main.getCurrentDataSet().allPrimitives(),
     49                                Main.ds.allPrimitives(),
    5050                                CzechAddressPlugin.getLocation().getStreets());
    5151
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/PointManipulatorDialog.form

    r15582 r16744  
    4444                  <Group type="103" groupAlignment="0" attributes="0">
    4545                      <Group type="102" alignment="1" attributes="0">
    46                           <Component id="locationEdit" pref="228" max="32767" attributes="0"/>
     46                          <Component id="locationEdit" pref="252" max="32767" attributes="0"/>
    4747                          <EmptySpace max="-2" attributes="0"/>
    4848                          <Component id="changeLocationButton" min="-2" max="-2" attributes="0"/>
    4949                      </Group>
    50                       <Component id="alternateNumberEdit" alignment="0" pref="293" max="32767" attributes="0"/>
    51                       <Component id="matchesComboBox" alignment="0" pref="293" max="32767" attributes="0"/>
     50                      <Component id="alternateNumberEdit" alignment="0" pref="309" max="32767" attributes="0"/>
     51                      <Component id="matchesComboBox" alignment="0" pref="309" max="32767" attributes="0"/>
    5252                  </Group>
    5353              </Group>
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/PointManipulatorDialog.java

    r16601 r16744  
    9999            proposalContainer.applyAll();
    100100
    101             Main.main.getCurrentDataSet().setSelected((Node) null); // TODO: This is an ugly hack.
    102             Main.main.getCurrentDataSet().setSelected(proposalContainer.getTarget());
     101            Main.ds.setSelected((Node) null); // TODO: This is an ugly hack.
     102            Main.ds.setSelected(proposalContainer.getTarget());
    103103
    104104            AddressElement elem = (AddressElement) matchesComboBox.getSelectedItem();
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/proposal/ExtractAddressIntoNodeProposal.java

    r16601 r16744  
    6666           way.remove(key);
    6767
    68         Main.main.getCurrentDataSet().addPrimitive(addrNode);
     68        Main.ds.addPrimitive(addrNode);
    6969    }
    7070
Note: See TracChangeset for help on using the changeset viewer.