/** Look for a node child of given name. * @param node node to search in * @param name name of child to look for * @return the found child, or <code>null</code> if there is no such child */ public static Node findChild(Node node, String name) { return node.getChildren().findChild(name); }
@Override public Node findChild(String name) { return getOriginal().findChild(name); }
public Node[] getNodes(boolean optimalResult) { final boolean LOG_ENABLED = LOGGER.isLoggable(Level.FINER); ChildrenArray hold = null; Node find = null; if (optimalResult) { if (LOG_ENABLED) { LOGGER.finer("computing optimal result"); // NOI18N } hold = getArray(null); if (LOG_ENABLED) { LOGGER.finer("optimal result is here: " + hold); // NOI18N } find = children.findChild(null); if (LOG_ENABLED) { LOGGER.finer("Find child got: " + find); // NOI18N } Children.LOG.log(Level.FINEST, "after findChild: {0}", optimalResult); } return getNodes(); }
/** Find the node. * @return the found node * @exception IOException if the parent cannot be recreated * @exception NodeNotFoundException if the path is not valid (exception may be examined for details) */ public Node getNode() throws java.io.IOException { Node parentNode = parent.getNode(); Node child = parentNode.getChildren().findChild(path); if (child != null) { return child; } else { throw new NodeNotFoundException(parentNode, path, 0); } }
holder = children.findChild(null);
Node foundChild = parentNode.getChildren().findChild(childPath); if (foundChild != node) { Logger.getLogger(DefaultHandle.class.getName()).log(Level.WARNING,
/** Look for a node child of given name. * @param node node to search in * @param name name of child to look for * @return the found child, or <code>null</code> if there is no such child */ public static Node findChild (Node node, String name) { return node.getChildren ().findChild (name); }
public String getNewBeanId(String prefix) { String newId; int count = 0; // Create unique ID, but not too many tries (avoid infinite or long loops). do { newId = prefix + newBeanId.getAndIncrement(); } while(getChildren().findChild(newId) != null && ++count < 100); return newId; }
/** Look for a node child of given name. * @param node node to search in * @param name name of child to look for * @return the found child, or <code>null</code> if there is no such child */ public static Node findChild (Node node, String name) { return node.getChildren ().findChild (name); }
private Node[] findDropedNodes(Node folder, Node[] dragNodes) { if ((folder == null) || (dragNodes.length == 0)) { return null; } Node[] dropNodes = new Node[dragNodes.length]; Children children = folder.getChildren(); for (int i = 0; i < dragNodes.length; i++) { dropNodes[i] = children.findChild(dragNodes[i].getName()); } return dropNodes; }
private Node[] findDropedNodes(Node folder, Node[] dragNodes) { if ((folder == null) || (dragNodes.length == 0)) { return null; } Node[] dropNodes = new Node[dragNodes.length]; Children children = folder.getChildren(); for (int i = 0; i < dragNodes.length; i++) { dropNodes[i] = children.findChild(dragNodes[i].getName()); } return dropNodes; }
private Node[] findDropedNodes (Node folder, Node[] dragNodes) { if (folder==null||dragNodes.length==0) { return null; } Node[] dropNodes = new Node[dragNodes.length]; Children children = folder.getChildren (); for (int i=0; i<dragNodes.length; i++) { dropNodes[i] = children.findChild (dragNodes[i].getName ()); } return dropNodes; }
private Node[] findDropedNodes (Node folder, Node[] dragNodes) { if (folder==null||dragNodes.length==0) { return null; } Node[] dropNodes = new Node[dragNodes.length]; Children children = folder.getChildren (); for (int i=0; i<dragNodes.length; i++) { dropNodes[i] = children.findChild (dragNodes[i].getName ()); } return dropNodes; }
public Node findChild (String name) { original.getChildren ().findChild (name); return super.findChild (name); }
private Node findChild(Node node, String name, int i) { node.getChildren ().getNodes (true); Node newSubfolder = node.getChildren ().findChild (name); if (newSubfolder == null && i > 0) { try { Thread.sleep(333); } catch (InterruptedException ex) { } newSubfolder = findChild(node, name, i--); } return newSubfolder; }
private Node findNodeInServerFiles(Node root, FileObject fo) { Node configFiles = root.getChildren().findChild("setup"); // NOI18N if (configFiles == null) { return null; } return NodeOp.findChild(configFiles, fo.getName()); }
/** Find the node. * @return the found node * @exception IOException if the parent cannot be recreated * @exception NodeNotFoundException if the path is not valid (exception may be examined for details) */ public Node getNode () throws java.io.IOException { Node parentNode = parent.getNode (); Node child = parentNode.getChildren ().findChild (path); if (child != null) return child; else throw new NodeNotFoundException (parentNode, path, 0); }
public void run() { Node root = ptLogial.getExplorerManager().getRootContext(); // Node projNode = root.getChildren ().findChild( p.getProjectDirectory().getName () ); Node projNode = root.getChildren().findChild( ProjectUtils.getInformation( p ).getName() ); if ( projNode != null ) { try { ptLogial.getExplorerManager().setSelectedNodes( new Node[] { projNode } ); } catch (Exception ignore) { // may ignore it } } } });