@Nullable
  public Object getContent(Object object) {
    if (object instanceof GroupNode node) {
      object = node.getSingleRoot();
    }
    if (object instanceof FileNode node) {
      PsiElement element = node.findFileSystemItem(node.getVirtualFile());
      if (element == null || node.compacted == null) return element;
      if (isPackage(node.getIcon()) && node.getSettings().isFlattenPackages()) return element;
      ArrayDeque<PsiElement> deque = new ArrayDeque<>();
      node.compacted.forEach(file -> {
        PsiFileSystemItem item = node.findFileSystemItem(file);
        if (item != null) deque.addFirst(item);
      });
      if (deque.isEmpty()) return element;
      deque.addFirst(element);
      return deque.toArray();
    }
    if (object instanceof NodeDescriptor) {
      object = ((NodeDescriptor<?>)object).getElement();
    }
    if (object instanceof AbstractTreeNode) {
      object = ((AbstractTreeNode<?>)object).getValue();
    }
    return object;
  }
@Nullable
  public Object getContent(Object object)