Author: rombert
Date: Wed Oct  1 19:02:33 2014
New Revision: 1628811

URL: http://svn.apache.org/r1628811
Log:
SLING-3988 - Content Navigator does not show nodes with escaped names

Remove node hiding in GenericJcrRootFile . There is no side effect that
I could notice, and the tests should validate all of the cases that I
can think of.

Modified:
    
sling/trunk/tooling/ide/eclipse-test/src/org/apache/sling/ide/test/impl/JcrContentContentProviderTest.java
    
sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/nav/model/GenericJcrRootFile.java

Modified: 
sling/trunk/tooling/ide/eclipse-test/src/org/apache/sling/ide/test/impl/JcrContentContentProviderTest.java
URL: 
http://svn.apache.org/viewvc/sling/trunk/tooling/ide/eclipse-test/src/org/apache/sling/ide/test/impl/JcrContentContentProviderTest.java?rev=1628811&r1=1628810&r2=1628811&view=diff
==============================================================================
--- 
sling/trunk/tooling/ide/eclipse-test/src/org/apache/sling/ide/test/impl/JcrContentContentProviderTest.java
 (original)
+++ 
sling/trunk/tooling/ide/eclipse-test/src/org/apache/sling/ide/test/impl/JcrContentContentProviderTest.java
 Wed Oct  1 19:02:33 2014
@@ -30,7 +30,6 @@ import org.eclipse.core.resources.IFolde
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.runtime.Path;
 import org.hamcrest.CoreMatchers;
-import org.junit.Ignore;
 import org.junit.Rule;
 import org.junit.Test;
 
@@ -91,7 +90,6 @@ public class JcrContentContentProviderTe
     }
 
     @Test
-    @Ignore("SLING-3988")
     public void listChildrenWithNestedContentXmlInEscapedDir() throws 
Exception {
 
         // create faceted project
@@ -125,6 +123,11 @@ public class JcrContentContentProviderTe
         Object[] children2 = contentProvider.getChildren(contentNode);
         assertChildrenHavePaths(children2, "/content/sling:stuff");
 
+        // test children of '/content/sling:stuff
+        JcrNode slingStuffNode = (JcrNode) children2[0];
+        Object[] children3 = contentProvider.getChildren(slingStuffNode);
+        assertChildrenHavePaths(children3); // no children
+
     }
 
     private void assertChildrenHavePaths(Object[] children, String... paths) {

Modified: 
sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/nav/model/GenericJcrRootFile.java
URL: 
http://svn.apache.org/viewvc/sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/nav/model/GenericJcrRootFile.java?rev=1628811&r1=1628810&r2=1628811&view=diff
==============================================================================
--- 
sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/nav/model/GenericJcrRootFile.java
 (original)
+++ 
sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/nav/model/GenericJcrRootFile.java
 Wed Oct  1 19:02:33 2014
@@ -83,7 +83,6 @@ public class GenericJcrRootFile extends 
                if (isRootContentXml()) {
                        if (parent instanceof DirNode) {
                                DirNode dirNodeParent = (DirNode)parent;
-                               JcrNode dirNodeParentParent = 
dirNodeParent.getParent();
                                JcrNode effectiveSibling = 
dirNodeParent.getEffectiveSibling();
                                if (effectiveSibling!=null) {
                                    effectiveSibling.dirSibling = dirNodeParent;
@@ -92,7 +91,6 @@ public class GenericJcrRootFile extends 
                                    handleProperties(element, 
parent.properties);
                                }
                                effectiveParent = parent;
-                               dirNodeParentParent.hide(parent);
                        } else {
                                handleProperties(element, parent.properties);
                                effectiveParent = parent;


Reply via email to