public static void expandAll(@NotNull JTree tree, @NotNull Runnable onDone) {
    promiseExpandAll(tree).onSuccess(result -> EdtInvocationManager.invokeLaterIfNeeded(onDone));
  }
public static void expandAll(@NotNull JTree tree, @NotNull Runnable onDone)