Browse Source

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
master
nickdavis 24 years ago
parent
commit
6913a6c5ad
1 changed files with 14 additions and 0 deletions
  1. +14
    -0
      src/antidote/org/apache/tools/ant/gui/acs/ACSFactory.java

+ 14
- 0
src/antidote/org/apache/tools/ant/gui/acs/ACSFactory.java View File

@@ -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.


Loading…
Cancel
Save