Index: /applications/editors/josm/plugins/tageditor/build.xml
===================================================================
--- /applications/editors/josm/plugins/tageditor/build.xml	(revision 17636)
+++ /applications/editors/josm/plugins/tageditor/build.xml	(revision 17637)
@@ -89,5 +89,5 @@
                 <attribute name="Plugin-Description" value="Provides a dialog for editing tags in a tabular grid."/>
                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/TagEditor"/>
-                <attribute name="Plugin-Mainversion" value="2012"/>
+                <attribute name="Plugin-Mainversion" value="2141"/>
                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
             </manifest>
Index: /applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/preset/Group.java
===================================================================
--- /applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/preset/Group.java	(revision 17636)
+++ /applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/preset/Group.java	(revision 17637)
@@ -14,9 +14,7 @@
 import org.openstreetmap.josm.plugins.tageditor.util.IndentWriter;
 
-
 /**
  * Group represents a named group of preset items. Groups can be nested.
  * 
- * @author Gubaer
  *
  */
@@ -24,5 +22,4 @@
 	
 	static private Logger logger = Logger.getLogger(Group.class.getName());
-	
 	
 	private String name;
@@ -101,4 +98,3 @@
 		writer.writeLine("</group>");
 	} 
-	
 }
Index: /applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/preset/Presets.java
===================================================================
--- /applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/preset/Presets.java	(revision 17636)
+++ /applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/preset/Presets.java	(revision 17637)
@@ -3,6 +3,4 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
-import java.io.BufferedInputStream;
-import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStreamReader;
@@ -12,4 +10,5 @@
 import java.net.URLConnection;
 import java.util.ArrayList;
+import java.util.LinkedList;
 import java.util.List;
 import java.util.logging.Level;
@@ -24,78 +23,69 @@
 import org.openstreetmap.josm.plugins.tageditor.util.IndentWriter;
 
-
 public class Presets {
 	private static Logger logger = Logger.getLogger(Presets.class.getName());
-	
+
 	private static Presets presets = null;
-	
-	
-	static public void initPresets()  {
-		
+
+	static public void initPresets() {
+
 		presets = new Presets();
-		
+		LinkedList<String> sources = new LinkedList<String>();
+
 		// code copied from org.openstreetmap.josm.gui.tagging.TaggingPreset
 		// and slightly modified
 		//
-		
-		String allTaggingPresets = Main.pref.get("taggingpreset.sources");
+		if (Main.pref.getBoolean("taggingpreset.enable-defaults", true)) {
+			sources.add("resource://presets/presets.xml");
+		}
+		sources.addAll(Main.pref.getCollection("taggingpreset.sources",
+				new LinkedList<String>()));
 
-        if (Main.pref.getBoolean("taggingpreset.enable-defaults", true))
-        {
-            allTaggingPresets = "resource://presets/presets.xml"
-            + (allTaggingPresets != null ? ";"+allTaggingPresets : "");
-        }
+		for (String source : sources) {
+			logger.log(Level.INFO, String.format(
+					"starting to read presets from source '%1$s'", source));
+			try {
+				MirroredInputStream s = new MirroredInputStream(source);
+				InputStreamReader r;
+				try {
+					r = new InputStreamReader(s, "UTF-8");
+				} catch (UnsupportedEncodingException e) {
+					r = new InputStreamReader(s);
+				}
+				presets = loadPresets(r, presets);
 
-        for(String source : allTaggingPresets.split(";"))
-        {
-        	logger.log(Level.INFO, String.format("starting to read presets from source '%1$s'", source));
-            try {
-                MirroredInputStream s = new MirroredInputStream(source);
-                InputStreamReader r;
-                try
-                {
-                    r = new InputStreamReader(s, "UTF-8");
-                }
-                catch (UnsupportedEncodingException e)
-                {
-                    r = new InputStreamReader(s);
-                }
-                presets = loadPresets(r,presets);
-               
-            } catch(PresetIOException e) {
-            	logger.log(Level.SEVERE, tr("Could not read tagging preset source: {0}", source),e);
-            	JOptionPane.showMessageDialog(
-            			Main.parent, tr("Could not read tagging preset source: {0}",source),
-            			tr("Error"),
-            			JOptionPane.ERROR_MESSAGE);	
-            } catch (IOException e) {
-                e.printStackTrace();
-                JOptionPane.showMessageDialog(
-                		Main.parent, 
-                		tr("Could not read tagging preset source: {0}",source),
-                		tr("Error"),
-                		JOptionPane.ERROR_MESSAGE
-                		);
-            } 
-        }		 
+			} catch (PresetIOException e) {
+				logger
+						.log(Level.SEVERE, tr(
+								"Could not read tagging preset source: {0}",
+								source), e);
+				JOptionPane.showMessageDialog(Main.parent, tr(
+						"Could not read tagging preset source: {0}", source),
+						tr("Error"), JOptionPane.ERROR_MESSAGE);
+			} catch (IOException e) {
+				e.printStackTrace();
+				JOptionPane.showMessageDialog(Main.parent, tr(
+						"Could not read tagging preset source: {0}", source),
+						tr("Error"), JOptionPane.ERROR_MESSAGE);
+			}
+		}
 	}
-	
+
 	static public Presets loadPresets(URL from) throws PresetIOException {
 		try {
 			URLConnection con = from.openConnection();
 			con.connect();
-			Reader reader = new InputStreamReader(
-				con.getInputStream()
-			);
-			return loadPresets(reader,null);
-		} catch(Exception e) {
-			logger.log(Level.SEVERE, "exception caught while loading preset file",e);
+			Reader reader = new InputStreamReader(con.getInputStream());
+			return loadPresets(reader, null);
+		} catch (Exception e) {
+			logger.log(Level.SEVERE,
+					"exception caught while loading preset file", e);
 			throw new PresetIOException(e);
 		}
-		
+
 	}
-	
+
 	static public Presets loadPresets(Reader reader, Presets p) throws PresetIOException {
-		try{
+		try {
 			Parser parser = new Parser();
 			parser.setReader(reader);
@@ -103,40 +93,36 @@
 			parser.parse();
 			return parser.getPresets();
-		} catch(Exception e) {
+		} catch (Exception e) {
 			logger.log(Level.SEVERE, "exception caught while loading presets",e);
 			throw new PresetIOException(e);
 		}
 	}
-	
-	
-	
-	
+
 	static public Presets getPresets() {
 		if (presets == null) {
 			initPresets();
 		}
-		return presets;  
+		return presets;
 	}
-	
-	
+
 	private List<Group> groups;
-	
+
 	public Presets() {
 		groups = new ArrayList<Group>();
 	}
-	
+
 	public void addGroup(Group group) {
 		groups.add(group);
 	}
-	
+
 	public void removeGroup(Group group) {
 		groups.remove(group);
 	}
-	
+
 	public void dump(IndentWriter writer) throws IOException {
 		writer.indent();
 		writer.write("<presets>\n");
 		writer.incLevel();
-		for(Group group: groups) {
+		for (Group group : groups) {
 			group.dump(writer);
 		}
@@ -144,6 +130,6 @@
 		writer.indent();
 		writer.write("</presets>");
-	} 
-	
+	}
+
 	public List<Group> getGroups() {
 		return groups;
Index: /applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/preset/io/Parser.java
===================================================================
--- /applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/preset/io/Parser.java	(revision 17636)
+++ /applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/preset/io/Parser.java	(revision 17637)
@@ -2,4 +2,5 @@
 
 import java.io.Reader;
+import java.util.Stack;
 import java.util.logging.Level;
 import java.util.logging.Logger;
@@ -22,16 +23,13 @@
 	
 	static private Logger logger = Logger.getLogger(Parser.class.getName());
-	
-	
-	private Presets presets = null;
+    private Presets presets = null;
 	private Reader reader;
-	private Group currentGroup;
+	private Stack<Group> currentGroup;
 	private Item currentItem;
 	private boolean inOptionalKeys = false; 
 	private XMLReader parser;
-	 
-	
+
 	public Parser() {
-		currentGroup = null;
+		currentGroup = new Stack<Group>();
 		currentItem = null;
 	}
@@ -52,5 +50,4 @@
 		return reader;
 	}
-	
 	
 	public Presets getPresets() {
@@ -135,12 +132,13 @@
 	
 	protected void onStartGroup(String name, String iconName) {
-		currentGroup = new Group();
-		currentGroup.setName(translatedAttributeValue(name));
-		currentGroup.setIconName(iconName);
+		Group g = new Group();
+		g.setName(translatedAttributeValue(name));
+		g.setIconName(iconName);
+		currentGroup.push(g);
 	}
 	
 	protected void onEndGroup() {
-		presets.addGroup(currentGroup);
-		currentGroup = null; 
+		Group g = currentGroup.pop();
+		presets.addGroup(g); 
 	}
 	
@@ -156,5 +154,5 @@
 			throw new IllegalStateException("illegal state. no current group defined");
 		}
-		currentGroup.addItem(currentItem);
+		currentGroup.peek().addItem(currentItem);
 		currentItem = null; 
 	}
@@ -190,6 +188,4 @@
 	}
 	
-
-	
 	/**
 	 * The SAX handler for reading XML files with tag specifications 
@@ -198,5 +194,4 @@
 	 */
 	class Handler extends DefaultHandler {
-				
 		
 		@Override
@@ -205,6 +200,4 @@
 		}
 
-		
-
 		@Override
 		public void error(SAXParseException e) throws SAXException {
@@ -222,5 +215,4 @@
 		}
 
-		
 		protected String getAttribute(Attributes attributes, String qName) {
 			for (int i =0; i < attributes.getLength();i++) {
@@ -231,10 +223,8 @@
 			return null;
 		}
-
 		
 		@Override
 		public void startElement(String namespaceURI, String localName, String qName,
 				Attributes atts) throws SAXException {
-			
 			if ("group".equals(qName)) {
 				onStartGroup(getAttribute(atts, "name"), getAttribute(atts, "icon"));
@@ -263,6 +253,5 @@
 			} else if ("optional".equals(qName)) {
 				onEndOptionalKeys();
-			}
-			
+			}			
 		}
 
@@ -275,14 +264,4 @@
 			logger.log(Level.WARNING, "XML parsing warning", e);
 		}
-		
-		
-		
-	}
-	
-	
-	
- 
-	
-	
-	
+	}
 }
Index: /applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/preset/ui/PresetsTableModel.java
===================================================================
--- /applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/preset/ui/PresetsTableModel.java	(revision 17636)
+++ /applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/preset/ui/PresetsTableModel.java	(revision 17637)
@@ -21,5 +21,4 @@
 	private Presets presets = null;
 
-
 	protected void initModelFromPresets(Presets presets) {
 		for(Group group: presets.getGroups()) {
@@ -30,5 +29,4 @@
 		}
 	}
-
 
 	public PresetsTableModel() {
@@ -44,6 +42,4 @@
 	}
 
-
-
 	public void setPresets(Presets presets) {
 		this.presets = presets;
@@ -51,6 +47,4 @@
 		fireTableDataChanged();
 	}
-
-
 
 	@Override
@@ -133,5 +127,4 @@
 			fireTableStructureChanged();
 		}
-
 	}
 }
