private static VirtualFile @NotNull [] filterByReadOnliness(VirtualFile @NotNull [] files) {
    List<VirtualFile> result = ContainerUtil.filter(files, VirtualFile::isInLocalFileSystem);
    return VfsUtilCore.toVirtualFileArray(result);
  }
private static VirtualFile @NotNull [] filterByReadOnliness(VirtualFile @NotNull [] files)