Ignore:
Timestamp:
2012-01-02T15:50:50+01:00 (13 years ago)
Author:
jttt
Message:

update to latest josm

Location:
applications/editors/josm/plugins/undelete
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/undelete/build.xml

    r27243 r27395  
    3232    <property name="commit.message" value="adapt to core changes (backwards compatible)"/>
    3333    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    34     <property name="plugin.main.version" value="4602"/>
     34    <property name="plugin.main.version" value="4734"/>
    3535    <!--
    3636      ************************************************
     
    145145    </target>
    146146    <!--
    147     ************************** Publishing the plugin *********************************** 
    148     -->
    149     <!--
    150         ** extracts the JOSM release for the JOSM version in ../core and saves it in the 
     147    ************************** Publishing the plugin ***********************************
     148    -->
     149    <!--
     150        ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    151151        ** property ${coreversion.info.entry.revision}
    152152        **
     
    194194    </target>
    195195    <!--
    196         ** commits the plugin.jar 
     196        ** commits the plugin.jar
    197197        -->
    198198    <target name="commit-dist">
    199199        <echo>
    200200    ***** Properties of published ${plugin.jar} *****
    201     Commit message    : '${commit.message}'                 
     201    Commit message    : '${commit.message}'
    202202    Plugin-Mainversion: ${plugin.main.version}
    203203    JOSM build version: ${coreversion.info.entry.revision}
    204204    Plugin-Version    : ${version.entry.commit.revision}
    205     ***** / Properties of published ${plugin.jar} *****                 
    206                        
     205    ***** / Properties of published ${plugin.jar} *****
     206
    207207    Now commiting ${plugin.jar} ...
    208208    </echo>
  • applications/editors/josm/plugins/undelete/src/org/openstreetmap/josm/plugins/undelete/Undelete.java

    r27243 r27395  
    2727import org.openstreetmap.josm.data.osm.Relation;
    2828import org.openstreetmap.josm.data.osm.RelationMember;
     29import org.openstreetmap.josm.data.osm.RelationMemberData;
    2930import org.openstreetmap.josm.data.osm.SimplePrimitiveId;
    3031import org.openstreetmap.josm.data.osm.User;
     
    7071      }
    7172
    72       public void actionPerformed(ActionEvent e) {
     73      @Override
     74        public void actionPerformed(ActionEvent e) {
    7375        JCheckBox layer = new JCheckBox(tr("Separate Layer"));
    7476        layer.setToolTipText(tr("Select if the data should be added into a new layer"));
     
    120122        Main.pref.put("undelete.osmid", Long.toString(tfId.getOsmId()));
    121123        List<Long> ids=new ArrayList<Long>();
    122         ids.add((long)tfId.getOsmId());
     124        ids.add(tfId.getOsmId());
    123125        undelete(layer.isSelected(), cbType.getType(), ids, 0);
    124126      }
     
    149151
    150152        Runnable r = new Runnable() {
    151             public void run() {
     153            @Override
     154                        public void run() {
    152155              List<Node> nodes=new ArrayList<Node>();
    153156              for (long id: ids)
     
    225228
    226229                      List<RelationMember> members = new ArrayList<RelationMember>(hRel.getNumMembers());
    227                       for (org.openstreetmap.josm.data.osm.history.RelationMember m : hRel.getMembers()) {
    228                         OsmPrimitive p = datas.getPrimitiveById(m.getPrimitiveId(), m.getPrimitiveType());
     230                      for (RelationMemberData m : hRel.getMembers()) {
     231                        OsmPrimitive p = datas.getPrimitiveById(m.getMemberId(), m.getMemberType());
    229232                        if (p == null) {
    230                             switch (m.getPrimitiveType()) {
    231                             case NODE: p = new Node(m.getPrimitiveId()); break;
    232                             case WAY: p = new Way(m.getPrimitiveId()); break;
    233                             case RELATION: p = new Relation(m.getPrimitiveId()); break;
     233                            switch (m.getMemberType()) {
     234                            case NODE: p = new Node(m.getMemberId()); break;
     235                            case WAY: p = new Way(m.getMemberId()); break;
     236                            case RELATION: p = new Relation(m.getMemberId()); break;
    234237                            }
    235238                            datas.addPrimitive(p);
Note: See TracChangeset for help on using the changeset viewer.