@Override
  public void invoke(@NotNull Project project, @Nullable Editor editor, PsiFile file) throws IncorrectOperationException {
    ModalityState modality = ModalityState.defaultModalityState();
    JavaProjectModelModificationService.getInstance(project)
      .addDependency(myCurrentModule, myLibraryDescriptor, myScope)
      .onSuccess(__ -> {
        if (editor == null) return;
        ReadAction.nonBlocking(() -> {
            PsiReference reference = restoreReference();
            if (myQualifiedClassName == null || reference == null) return null;
            try {
              return AddImportAction.create(editor, myCurrentModule, reference, myQualifiedClassName);
            }
            catch (IndexNotReadyException e) {
              Logger.getInstance(AddExtLibraryDependencyFix.class).info(e);
              return null;
            }
          })
          .expireWhen(() -> editor.isDisposed() || myCurrentModule.isDisposed())
          .finishOnUiThread(modality, action -> {
            if (action != null) {
              action.execute();
            }
          })
          .submit(AppExecutorUtil.getAppExecutorService());
      });
  }
@Override
  public void invoke(@NotNull Project project, @Nullable Editor editor, PsiFile file)