@Nullable
  public static TreeVisitor createVisitor(@NotNull Object object) {
    if (object instanceof AbstractTreeNode<?> node) {
      if (node.getEqualityObject() instanceof SmartPsiElementPointer<?> ptr) {
        return new ProjectViewNodeVisitor(ptr);
      }
      object = node.getValue();
    }
    else if (object instanceof ProjectFileNode node) {
      return createVisitor(node.getVirtualFile());
    }
    if (object instanceof VirtualFile virtualFile) return createVisitor(virtualFile);
    if (object instanceof PsiElement psiElement) return createVisitor(psiElement);
    LOG.warn("unsupported object: " + object);
    return null;
  }
@Nullable
  public static TreeVisitor createVisitor(@NotNull Object object)