+ throw new JcrException("Cannot create UI for context " + context, e);
+ }
+ }
+
+ @Override
+ default Control createUiPart(Composite parent, Content context) {
+ if (context == null)
+ return createUiPart(parent, (Node) null);
+ if (context instanceof JcrContent) {
+ Node node = ((JcrContent) context).getJcrNode();
+ return createUiPart(parent, node);
+ } else {
+ throw new IllegalArgumentException("Content " + context + " is not compatible with JCR");