/** Checks whether given Node is a subnode of rootContext. * and throws IllegalArgumentException if not. */ private void checkUnderRoot(Node value, String errorKey) { if (value != null && ! isUnderRoot (value)) { throw new IllegalArgumentException( NbBundle.getMessage(ExplorerManager.class, errorKey, value.getDisplayName (), rootContext.getDisplayName () ) ); } }
/** Checks whether given Node is a subnode of rootContext. * and throws IllegalArgumentException if not. */ private void checkUnderRoot(Node value, String errorKey) { if (value != null && ! isUnderRoot (value)) { throw new IllegalArgumentException( NbBundle.getMessage(ExplorerManager.class, errorKey, value.getDisplayName (), rootContext.getDisplayName () ) ); } }
/** Checks whether given Node is a subnode of rootContext. * and throws IllegalArgumentException if not. */ @Messages({"# {0} - name of node to be selected", "# {1} - name of node at root", "EXC_ContextMustBeWithinRootContext=An explored context ({0}) must be within the root context ({1})."}) private void checkUnderRoot(Node value) { if ((value != null) && !isUnderRoot(value)) { throw new IllegalArgumentException( EXC_ContextMustBeWithinRootContext( value.getDisplayName(), rootContext.getDisplayName() ) ); } }
} else if (isUnderRoot(exploredContext)) { explored = NodeOp.createPath(exploredContext, rootContext); } else { if (isUnderRoot(selectedNodes[i])) { selected.add(NodeOp.createPath(selectedNodes[i], rootContext));
if (exploredContext == null) explored = null; else if (isUnderRoot (exploredContext)) explored = NodeOp.createPath (exploredContext, rootContext); else if (isUnderRoot (selectedNodes[i])) { selected.add (NodeOp.createPath (selectedNodes[i], rootContext));
if (exploredContext == null) explored = null; else if (isUnderRoot (exploredContext)) explored = NodeOp.createPath (exploredContext, rootContext); else if (isUnderRoot (selectedNodes[i])) { selected.add (NodeOp.createPath (selectedNodes[i], rootContext));