void (Object @NotNull [] elements, @NotNull Runnable onDone, boolean checkIfInStructure) { try { runDone(new TreeRunnable("AbstractTreeUi._expand") { @Override public void perform() { if (elements.length == 0) { runDone(onDone); return; } if (myUpdaterState != null) { myUpdaterState.clearExpansion(); } ActionCallback done = new ActionCallback(elements.length); done .doWhenDone(wrapDone(onDone, "AbstractTreeUi._expand: on done expandNext")) .doWhenRejected(wrapDone(onDone, "AbstractTreeUi._expand: on rejected expandNext")); expandNext(elements, 0, false, checkIfInStructure, false, done, 0); } }); } catch (ProcessCanceledException e) { try { runDone(onDone); } catch (ProcessCanceledException ignored) { //todo added to fix IDEA-58475 } } }