/** * {@inheritDoc} */ public Element toXml(Document doc, Stack stack) { Element element = doc.createElement("tool"); ((Element) stack.peek()).appendChild(element); stack.push(element); element.setAttribute("id", getId()); String toolId = getToolId(); if (toolId != null) { element.setAttribute("toolId", toolId); } if (m_title != null) { element.setAttribute("title", m_title); } if (m_layoutHints != null) { element.setAttribute("layoutHints", m_layoutHints); } // properties Xml.propertiesToXml(getPlacementConfig(), doc, stack); stack.pop(); return (Element) element; }