private static @Nullable TreeElement findNextSuitableElement(@NotNull TreeElement start) {
    TreeElement element = start;
    while (element != null) {
      TreeElement nextTree = element;
      TreeElement next = null;
      while (next == null && (nextTree = nextTree.getTreeNext()) != null) {
        next = findFirstSuitableElement(nextTree);
      }
      if (next != null) {
        return next;
      }
      element = element.getTreeParent();
    }
    return null;
  }
private static @Nullable TreeElement findNextSuitableElement(@NotNull TreeElement start)