public static List<VirtualFile> getChangedFiles(@NotNull Project project) throws ExecutionException, InterruptedException {
    ChangeListManager changeListManager = ChangeListManager.getInstance(project);
    CompletableFuture<List<VirtualFile>> future = new CompletableFuture<>();
    changeListManager.invokeAfterUpdateWithModal(false, null, () -> {
      try {
        List<VirtualFile> files = changeListManager.getAffectedFiles();
        future.complete(files);
      }
      catch (Throwable e) {
        future.completeExceptionally(e);
      }
    });

    return future.get();
  }
public static List<VirtualFile> getChangedFiles(@NotNull Project project)