public static @NotNull List<@NotNull VirtualFile> getVirtualFileListFromAttachedObject(Object attached) {
    var files = getFileListFromAttachedObject(attached);
    if (files.isEmpty()) {
      return List.of();
    }
    else {
      var result = new ArrayList<VirtualFile>(files.size());
      for (File file : files) {
        var virtualFile = VfsUtil.findFileByIoFile(file, true);
        if (virtualFile == null) continue;
        result.add(virtualFile);
        // detect and store file type for Finder-2-IDEA drag-n-drop
        virtualFile.getFileType();
      }
      return result;
    }
  }
public static @NotNull List<@NotNull VirtualFile> getVirtualFileListFromAttachedObject(Object attached)