From 0780fc2d061e8d3e3cde378cc47b9709cb0f2140 Mon Sep 17 00:00:00 2001 From: Sam Griffin Date: Mon, 16 Apr 2012 18:03:09 -0400 Subject: [PATCH] fixed bug where packed nodes weren't getting their correct content type --- .../velir/intellij/cq5/actions/content/DestructiveImport.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/src/velir/intellij/cq5/actions/content/DestructiveImport.java b/source/src/velir/intellij/cq5/actions/content/DestructiveImport.java index 24d3b32..8ee1672 100755 --- a/source/src/velir/intellij/cq5/actions/content/DestructiveImport.java +++ b/source/src/velir/intellij/cq5/actions/content/DestructiveImport.java @@ -117,7 +117,7 @@ private void importR (Node node, PsiDirectory directory) throws RepositoryExcept // set root jcr node name by filename, rather than element name (since it's always jcr:root) String name = PsiUtils.unmungeNamespace(psiFile.getName().split("\\.")[0]); - final Node childNode = node.addNode(name); + final Node childNode = node.addNode(name, rootNode.getType()); setProperties(childNode, rootNode); // start recursion @@ -148,7 +148,7 @@ private void unpackRecursively (Element element, Node node) throws IOException, for (Object o : element.getChildren()) { Element childElement = (Element) o; VNode vNode = VNode.makeVNode(childElement); - Node childNode = node.addNode(vNode.getName()); + Node childNode = node.addNode(vNode.getName(), vNode.getType()); setProperties(childNode, vNode); unpackRecursively(childElement, childNode);