You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by st...@apache.org on 2013/09/20 12:49:27 UTC

svn commit: r1524971 - /sling/branches/tooling-ide-vlt/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/nav/model/JcrNode.java

Author: stefanegli
Date: Fri Sep 20 10:49:26 2013
New Revision: 1524971

URL: http://svn.apache.org/r1524971
Log:
SLING-2985 : content-browser improvement: supporting standard link-with-editor cases (again), plus icon for normal/plain files fixed

Modified:
    sling/branches/tooling-ide-vlt/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/nav/model/JcrNode.java

Modified: sling/branches/tooling-ide-vlt/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/nav/model/JcrNode.java
URL: http://svn.apache.org/viewvc/sling/branches/tooling-ide-vlt/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/nav/model/JcrNode.java?rev=1524971&r1=1524970&r2=1524971&view=diff
==============================================================================
--- sling/branches/tooling-ide-vlt/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/nav/model/JcrNode.java (original)
+++ sling/branches/tooling-ide-vlt/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/nav/model/JcrNode.java Fri Sep 20 10:49:26 2013
@@ -171,14 +171,6 @@ public class JcrNode implements IAdaptab
 			return false;
 		}
 		JcrNode other = (JcrNode) obj;
-		if (other.underlying==null && underlying!=null) {
-			return false;
-		} else if (other.underlying!=null && underlying==null) {
-			return false;
-		}
-		if (underlying!=null && !underlying.equals(other.underlying)) {
-			return false;
-		}
 		if (resource!=null && other.resource!=null) {
 			if (resource.equals(other.resource)) {
 				return true;
@@ -190,6 +182,14 @@ public class JcrNode implements IAdaptab
 		} else if (resource==null && other.resource!=null) {
 			return false;
 		}
+		if (other.underlying==null && underlying!=null) {
+			return false;
+		} else if (other.underlying!=null && underlying==null) {
+			return false;
+		}
+		if (underlying!=null && !underlying.equals(other.underlying)) {
+			return false;
+		}
 		if (parent!=null && other.parent!=null) {
 			if (!parent.equals(other.parent)) {
 				return false;
@@ -427,6 +427,9 @@ public class JcrNode implements IAdaptab
 			}
 			return workbenchLabelProvider.getImage(resource);
 		} else {
+			if (resource!=null) {
+				return workbenchLabelProvider.getImage(resource);
+			}
 			return WhitelabelSupport.JCR_NODE_ICON.createImage();
 		}
 		
@@ -618,9 +621,7 @@ public class JcrNode implements IAdaptab
 		if (resource instanceof IFile) {
 //			if (!isVaultFile(resource)) {
 			return (IFile)resource;
-		} else if (resource instanceof IContainer) {
-			return null;
-		} else if (underlying!=null && underlying.file!=null) {
+		} else if (underlying!=null && underlying.file!=null && domNode!=null) {
 			return underlying.file;
 		} else {
 			return null;