private void xmlWriteTabGroups(PrintWriter out) throws IOException {
		// there is redundant information in the tabbedGroups Map... so we have
		// to simplify it

		ArrayList uniqueGroups = new ArrayList();
		ArrayList processedDockables = new ArrayList();
		Iterator<Dockable> it = tabbedGroups.keySet().iterator();
		while (it.hasNext()) {
			Dockable d = it.next();
			if (!processedDockables.contains(d)) {
				processedDockables.add(d);
				LinkedList tabList = tabbedGroups.get(d);
				Iterator listIt = tabList.iterator();
				while (listIt.hasNext()) {
					Dockable d2 = (Dockable) listIt.next();
					if (!processedDockables.contains(d2)) {
						processedDockables.add(d2);
					}
				}
				uniqueGroups.add(tabList);
			}
		}

		out.println("<TabGroups>");
		for (int i = 0; i < uniqueGroups.size(); i++) {
			out.println("<TabGroup>");
			LinkedList group = (LinkedList) uniqueGroups.get(i);
			Iterator listIt = group.iterator();
			while (listIt.hasNext()) {
				Dockable d = (Dockable) listIt.next();
				xmlWriteDockableTab(d, out);
			}
			out.println("</TabGroup>");
		}
		out.println("</TabGroups>");
	}