void (final NodeElement[] elements, final int index, final ProgressIndicator indicator, final ActionCallback callback) { if (indicator.isCanceled()) { callback.setRejected(); return; } if (index >= elements.length) { callback.setDone(); return; } getBuilder().expand(elements[index], () -> expandNext(elements, index + 1, indicator, callback)); }