private NodeDescriptor<?> getUpdatedDescriptor(NodeDescriptor<?> descriptor) {
    if (
      getSortKey() == NodeSortKey.BY_NAME &&
      descriptor instanceof ProjectViewNode<?> projectViewNode && projectViewNode.isSortByFirstChild()
    ) {
      Collection<? extends AbstractTreeNode<?>> children = projectViewNode.getChildren();
      if (!children.isEmpty()) {
        descriptor = children.iterator().next();
        descriptor.update();
      }
    }
    return descriptor;
  }
private NodeDescriptor<?> getUpdatedDescriptor(NodeDescriptor<?> descriptor)