From 6913a6c5add61c762535a537594b417ab03ac89a Mon Sep 17 00:00:00 2001 From: nickdavis Date: Fri, 6 Apr 2001 15:50:34 +0000 Subject: [PATCH] new elements will have required attributes added git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268923 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/tools/ant/gui/acs/ACSFactory.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/antidote/org/apache/tools/ant/gui/acs/ACSFactory.java b/src/antidote/org/apache/tools/ant/gui/acs/ACSFactory.java index c4feb5797..56e30ed52 100644 --- a/src/antidote/org/apache/tools/ant/gui/acs/ACSFactory.java +++ b/src/antidote/org/apache/tools/ant/gui/acs/ACSFactory.java @@ -244,10 +244,24 @@ public class ACSFactory { getOwnerDocument().createElement(name); // XXX fixme. indent(node, 1); + addRequiredAttributes(retval); node.appendChild(retval); return retval; } + /** + * Add required attributes to the node. + * + * @param node the Node to add the attrinutes to. + */ + public void addRequiredAttributes(ACSElement node) { + if (node instanceof ACSDtdDefinedElement) { + ACSDtdDefinedElement dtdElement = + (ACSDtdDefinedElement) node; + dtdElement.addRequiredAttributes(); + } + } + /** * Insert a new line and indentation at the end of the given * node in preparation for a new element being added.