/** * Add constraints from newly discovered nodes. Note: the act of adding constraints may discover new nodes, so this routine is * iterative. * * @return true iff any new constraints are added. */ protected boolean addConstraintsFromNewNodes(IProgressMonitor monitor) throws CancelException { boolean result = false; while (!discoveredNodes.isEmpty()) { Iterator<CGNode> it = discoveredNodes.iterator(); discoveredNodes = HashSetFactory.make(); while (it.hasNext()) { CGNode n = it.next(); result |= addConstraintsFromNode(n, monitor); } } return result; }
/** * Add constraints from newly discovered nodes. Note: the act of adding constraints may discover new nodes, so this routine is * iterative. * * @return true iff any new constraints are added. */ protected boolean addConstraintsFromNewNodes(IProgressMonitor monitor) throws CancelException { boolean result = false; while (!discoveredNodes.isEmpty()) { Iterator<CGNode> it = discoveredNodes.iterator(); discoveredNodes = HashSetFactory.make(); while (it.hasNext()) { CGNode n = it.next(); result |= addConstraintsFromNode(n, monitor); } } return result; }