Package org.apache.tools.ant.gui.xml

Examples of org.apache.tools.ant.gui.xml.DOMNode


    public String getDisplayName() {
        String name = getTagName();

        // Is there only one attribute?
        if (getAttributes().getLength() == 1) {
            DOMNode onlyNode = getAttributes().item(0);

            // Display the only attribute
            name += ": " + onlyNode.getNodeValue();
        } else {
           
            // Display one of these attributes
            // if they are present.
            final String[] DISPLAY_ATTRIBUTES =
            {
                "name",
                "id",
                "property"
            };

            for(int i = 0; i < DISPLAY_ATTRIBUTES.length; i++) {
                DOMNode testNode =
                    getAttributes().getNamedItem(DISPLAY_ATTRIBUTES[i]);
                if (testNode != null) {
                    name += ": " + testNode.getNodeValue();
                    break;
                }
            }
        }
       
View Full Code Here


        DOMAttributes retval =
            new DOMAttributes(getDtdElement());

        NamedDOMNodeMap attribs = getAttributes();
        for(int i = 0, len = attribs.getLength(); i < len; i++) {
            DOMNode n = attribs.item(i);
            retval.setProperty(n.getNodeName(), n.getNodeValue());
        }
        return retval;
    }
View Full Code Here

       
        DOMNodeList allNodes = parentProject.getChildNodes();
        ArrayList retVal = new ArrayList();
        int length = allNodes.getLength();
        for (int i = 0; i < length; i++) {
            DOMNode node = allNodes.item(i);
            if (node instanceof ACSTargetElement) {
                ACSTargetElement currentElement = ((ACSTargetElement)node);
                // ... leave out the current target TODO: avoid cyclic relations!
                if (!currentElement.getName().equals(aTarget.getName())) retVal.add(currentElement);
            }
View Full Code Here

       
        DOMNodeList all2ndLevelNodes = context.getProjectManager().getOpen()[0].getChildNodes();

        int i= 0;
        while (i < all2ndLevelNodes.getLength()) {
           DOMNode node = all2ndLevelNodes.item(i);
           if (node instanceof ACSTargetElement) {
               ACSTargetElement newTarget = ((ACSTargetElement)node);
               DependentTargetPropertyEditor a = new DependentTargetPropertyEditor();
               c.add(a.getChild());
               a.setValue(newTarget);
View Full Code Here

TOP

Related Classes of org.apache.tools.ant.gui.xml.DOMNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.