You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2014/05/23 22:47:52 UTC
svn commit: r1597176 -
/sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/actions/JcrNewNodeAction.java
Author: rombert
Date: Fri May 23 20:47:51 2014
New Revision: 1597176
URL: http://svn.apache.org/r1597176
Log:
JcrNewNodeAction - tolerate a stopped/missing server.
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=1597176&r1=1597175&r2=1597176&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 Fri May 23 20:47:51 2014
@@ -51,6 +51,11 @@ public class JcrNewNodeAction implements
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 "
+ + node.getProject().getName() + " is not associated with a server or the server is not started.");
+ return;
+ }
NodeTypeRegistry ntManager = repository.getNodeTypeRegistry();
try {