Ignore:
Timestamp:
2009-06-15T20:22:46+02:00 (11 years ago)
Author:
Gubaer
Message:

fixed: bug in OsmApi.getOsmApi()
cleanup: exception handling in interfacing with OSM API
new: new action for updating individual elements with the their current state on the server (including new menu item in the file menu)
new: improved user feedback in case of conflicts
new: handles 410 Gone conflicts when uploading a changeset
new: undoable command for "purging" a primitive from the current dataset (necessary if the primitive is already deleted on the server and the user wants to remove it from its local dataset)
new: undoable command for "undeleting" an already deleted primitive on the server (kind of "cloning")
new: after a full upload, checks whether there are primitives in the local dataset which might be deleted on the server.
new: data structures for history data
new: history download support in io package

Location:
trunk/src/org/openstreetmap/josm/command
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/command/CoordinateConflictResolveCommand.java

    r1654 r1670  
    3333    /** the merge decision */
    3434    private final MergeDecisionType decision;
    35 
    36 
    37     /**
    38      * replies a (localized) display name for the type of an OSM primitive
    39      *
    40      * @param primitive the primitive
    41      * @return a localized display name
    42      */
    43     protected String getPrimitiveTypeAsString(OsmPrimitive primitive) {
    44         if (primitive instanceof Node) return tr("node");
    45         if (primitive instanceof Way) return tr("way");
    46         if (primitive instanceof Relation) return tr("relation");
    47         return "";
    48     }
    4935
    5036    /**
  • trunk/src/org/openstreetmap/josm/command/TagConflictResolveCommand.java

    r1654 r1670  
    1414import org.openstreetmap.josm.data.osm.Node;
    1515import org.openstreetmap.josm.data.osm.OsmPrimitive;
     16import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
    1617import org.openstreetmap.josm.data.osm.Relation;
    1718import org.openstreetmap.josm.data.osm.Way;
     
    5253
    5354    /**
    54      * replies a (localized) display name for the type of an OSM primitive
    55      *
    56      * @param primitive the primitive
    57      * @return a localized display name
    58      */
    59     protected String getPrimitiveTypeAsString(OsmPrimitive primitive) {
    60         if (primitive instanceof Node) return tr("node");
    61         if (primitive instanceof Way) return tr("way");
    62         if (primitive instanceof Relation) return tr("relation");
    63         return "";
    64     }
    65 
    66     /**
    6755     * constructor
    6856     *
     
    8270        return new DefaultMutableTreeNode(
    8371                new JLabel(
    84                         tr("Resolve {0} tag conflicts in {1} {2}",getNumDecidedConflicts(), getPrimitiveTypeAsString(my), my.id),
     72                        tr("Resolve {0} tag conflicts in {1} {2}",getNumDecidedConflicts(), OsmPrimitiveType.from(my).getLocalizedDisplayNameSingular(), my.id),
    8573                        ImageProvider.get("data", "object"),
    8674                        JLabel.HORIZONTAL
  • trunk/src/org/openstreetmap/josm/command/VersionConflictResolveCommand.java

    r1654 r1670  
    1313import org.openstreetmap.josm.data.osm.Node;
    1414import org.openstreetmap.josm.data.osm.OsmPrimitive;
     15import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
    1516import org.openstreetmap.josm.data.osm.Relation;
    1617import org.openstreetmap.josm.data.osm.Way;
     
    3738    }
    3839
    39     //FIXME copied from TagConflictResolveCommand -> refactor
    40     /**
    41      * replies a (localized) display name for the type of an OSM primitive
    42      *
    43      * @param primitive the primitive
    44      * @return a localized display name
    45      */
    46     protected String getPrimitiveTypeAsString(OsmPrimitive primitive) {
    47         if (primitive instanceof Node) return tr("node");
    48         if (primitive instanceof Way) return tr("way");
    49         if (primitive instanceof Relation) return tr("relation");
    50         return "";
    51     }
    52 
    5340    @Override
    5441    public MutableTreeNode description() {
    5542        return new DefaultMutableTreeNode(
    5643                new JLabel(
    57                         tr("Resolve version conflicts for {0} {1}",getPrimitiveTypeAsString(my), my.id),
     44                        tr("Resolve version conflicts for {0} {1}",OsmPrimitiveType.from(my).getLocalizedDisplayNameSingular(), my.id),
    5845                        ImageProvider.get("data", "object"),
    5946                        JLabel.HORIZONTAL
Note: See TracChangeset for help on using the changeset viewer.