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 2014/06/04 10:32:50 UTC
svn commit: r1599990 -
/sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/actions/JcrNewNodeAction.java
Author: stefanegli
Date: Wed Jun 4 08:32:49 2014
New Revision: 1599990
URL: http://svn.apache.org/r1599990
Log:
SLING-2985 : disallow creation of child nodes for nt:file-s
Modified:
sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/actions/JcrNewNodeAction.java
Modified: sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/actions/JcrNewNodeAction.java
URL: http://svn.apache.org/viewvc/sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/actions/JcrNewNodeAction.java?rev=1599990&r1=1599989&r2=1599990&view=diff
==============================================================================
--- sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/actions/JcrNewNodeAction.java (original)
+++ sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/actions/JcrNewNodeAction.java Wed Jun 4 08:32:49 2014
@@ -50,6 +50,10 @@ public class JcrNewNodeAction implements
MessageDialog.openInformation(shell, "Cannot create node", "Node not in filter.xml");
return;
}
+ if (node.getNodeType().getName().equals("nt:file")) {
+ MessageDialog.openInformation(shell, "Cannot create node", "Node of type nt:file cannot have children");
+ return;
+ }
Repository repository = ServerUtil.getDefaultRepository(node.getProject());
if (repository == null) {
MessageDialog.openWarning(null, "Unable to create a new node", "Unable to create a new node since project "