diff --git a/ruby.project/src/org/netbeans/modules/ruby/rubyproject/UpdateHelper.java b/ruby.project/src/org/netbeans/modules/ruby/rubyproject/UpdateHelper.java --- a/ruby.project/src/org/netbeans/modules/ruby/rubyproject/UpdateHelper.java +++ b/ruby.project/src/org/netbeans/modules/ruby/rubyproject/UpdateHelper.java @@ -278,7 +278,7 @@ // if (oldRoot != null) { // Document doc = oldRoot.getOwnerDocument(); // Element newRoot = doc.createElementNS (RubyProjectType.PROJECT_CONFIGURATION_NAMESPACE,"data"); //NOI18N -// copyDocument (doc, oldRoot, newRoot); +// XMLUtil.copyDocument (doc, oldRoot, newRoot); // Element sourceRoots = doc.createElementNS(RubyProjectType.PROJECT_CONFIGURATION_NAMESPACE,"source-roots"); //NOI18N // Element root = doc.createElementNS (RubyProjectType.PROJECT_CONFIGURATION_NAMESPACE,"root"); //NOI18N // root.setAttribute ("id","src.dir"); //NOI18N @@ -295,7 +295,7 @@ // if (oldRoot != null) { // Document doc = oldRoot.getOwnerDocument(); // Element newRoot = doc.createElementNS (RubyProjectType.PROJECT_CONFIGURATION_NAMESPACE,"data"); //NOI18N -// copyDocument (doc, oldRoot, newRoot); +// XMLUtil.copyDocument (doc, oldRoot, newRoot); // cachedElement = updateMinAntVersion (newRoot, doc); // } // } @@ -308,39 +308,6 @@ return cachedProperties; } - private static void copyDocument(Document doc, Element from, Element to, String projectConfigurationNamespace) { - NodeList nl = from.getChildNodes(); - int length = nl.getLength(); - for (int i=0; i< length; i++) { - Node node = nl.item (i); - Node newNode = null; - switch (node.getNodeType()) { - case Node.ELEMENT_NODE: - Element oldElement = (Element) node; - newNode = doc.createElementNS(projectConfigurationNamespace, oldElement.getTagName()); - NamedNodeMap m = oldElement.getAttributes(); - Element newElement = (Element) newNode; - for (int index = 0; index < m.getLength(); index++) { - Node attr = m.item(index); - newElement.setAttribute(attr.getNodeName(), attr.getNodeValue()); - } - copyDocument(doc, oldElement, newElement, projectConfigurationNamespace); - break; - case Node.TEXT_NODE: - Text oldText = (Text) node; - newNode = doc.createTextNode(oldText.getData()); - break; - case Node.COMMENT_NODE: - Comment oldComment = (Comment) node; - newNode = doc.createComment(oldComment.getData()); - break; - } - if (newNode != null) { - to.appendChild (newNode); - } - } - } - // private static Element updateMinAntVersion (final Element root, final Document doc) { // NodeList list = root.getElementsByTagNameNS (RubyProjectType.PROJECT_CONFIGURATION_NAMESPACE,MINIMUM_ANT_VERSION_ELEMENT); // if (list.getLength() == 1) {