void (Element element) { saveExpandedPaths(); for (Map.Entry<String, TreeState> entry : myReadTreeState.entrySet()) { String subId = entry.getKey(); TreeState treeState = entry.getValue(); Element subPane = new Element(ELEMENT_SUB_PANE); if (subId != null) { subPane.setAttribute(ATTRIBUTE_SUB_ID, subId); } treeState.writeExternal(subPane); element.addContent(subPane); } }