Ignore:
Timestamp:
2008-08-22T15:52:17+02:00 (18 years ago)
Author:
stoecker
Message:

fixed tagging presets touse proper XML makeing translations much easier

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java

    r679 r824  
    6767                                if (mapping.get(qname).onStart)
    6868                                        report();
     69                                if (mapping.get(qname).both)
     70                                {
     71                                        try {
     72                                                queue.put(current.peek());
     73                                        } catch (InterruptedException e) {
     74                                        }
     75                                }
    6976                        }
    7077                }
    … …  
    156163                Class<?> klass;
    157164                boolean onStart;
    158                 public Entry(Class<?> klass, boolean onStart) {
     165                boolean both;
     166                public Entry(Class<?> klass, boolean onStart, boolean both) {
    159167                        super();
    160168                        this.klass = klass;
    161169                        this.onStart = onStart;
     170                        this.both = both;
    162171                }
    163172        }
    … …  
    209218
    210219        public void map(String tagName, Class<?> klass) {
    211                 mapping.put(tagName, new Entry(klass,false));
     220                mapping.put(tagName, new Entry(klass,false,false));
    212221        }
    213222
    214223        public void mapOnStart(String tagName, Class<?> klass) {
    215                 mapping.put(tagName, new Entry(klass,true));
     224                mapping.put(tagName, new Entry(klass,true,false));
     225        }
     226
     227        public void mapBoth(String tagName, Class<?> klass) {
     228                mapping.put(tagName, new Entry(klass,false,true));
    216229        }
    217230
Note: See TracChangeset for help on using the changeset viewer.