Changeset 8742 in josm for trunk/src/org


Ignore:
Timestamp:
2015-09-10T08:54:25+02:00 (9 years ago)
Author:
simon04
Message:

fix #11834 - KeyValueVisitor: also provide primitive to the visitor

Location:
trunk/src/org/openstreetmap/josm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java

    r8740 r8742  
    3131     *
    3232     * @author Michael Zangl
    33      * @since 8740
     33     * @since 8742
    3434     */
    3535    public interface KeyValueVisitor {
     
    3838         * This method gets called for every tag received.
    3939         *
     40         * @param primitive This primitive
    4041         * @param key   The key
    4142         * @param value The value
    4243         */
    43         void visitKeyValue(String key, String value);
     44        void visitKeyValue(AbstractPrimitive primitive, String key, String value);
    4445    }
    4546
     
    514515     * @param visitor The visitor to call.
    515516     * @see #getKeys()
    516      * @since 8740
     517     * @since 8742
    517518     */
    518519    public void visitKeys(KeyValueVisitor visitor) {
     
    520521        if (keys != null) {
    521522            for (int i = 0; i < keys.length; i += 2) {
    522                 visitor.visitKeyValue(keys[i], keys[i + 1]);
     523                visitor.visitKeyValue(this, keys[i], keys[i + 1]);
    523524            }
    524525        }
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSource.java

    r8740 r8742  
    3030import org.openstreetmap.josm.Main;
    3131import org.openstreetmap.josm.data.Version;
     32import org.openstreetmap.josm.data.osm.AbstractPrimitive;
    3233import org.openstreetmap.josm.data.osm.AbstractPrimitive.KeyValueVisitor;
    3334import org.openstreetmap.josm.data.osm.Node;
     
    172173
    173174            @Override
    174             public void visitKeyValue(String key, String value) {
     175            public void visitKeyValue(AbstractPrimitive p, String key, String value) {
    175176                MapCSSKeyRules v = index.get(key);
    176177                if (v != null) {
Note: See TracChangeset for help on using the changeset viewer.