/** * Computes the children for the given parent in the specified context. * * @param update update request */ protected void retrieveChildren(IChildrenUpdate update) { if (!update.isCanceled()) { IStatus status = Status.OK_STATUS; try { IPresentationContext context = update.getPresentationContext(); if (supportsContext(context)) { int offset = update.getOffset(); Object[] children = getChildren(update.getElement(), offset, update.getLength(), context, update); if (!update.isCanceled() && children != null) { for (int i = 0; i < children.length; i++) { update.setChild(children[i], offset + i); } } } } catch (CoreException e) { status = e.getStatus(); } update.setStatus(status); } }