void (@NotNull Project project, Editor editor, @NotNull Module module) { Couple<Module> circularModules = CircularModuleDependenciesDetector.addingDependencyFormsCircularity(myCurrentModule, module); if (circularModules == null || showCircularWarning(project, circularModules, module)) { JavaProjectModelModificationService.getInstance(project).addDependency(myCurrentModule, module, myScope, myExported); if (editor != null && !myClasses.isEmpty()) { PsiClass[] targetClasses = myClasses.stream() .map(SmartPsiElementPointer::getElement) .filter(c -> c != null && ModuleUtilCore.findModuleForPsiElement(c) == module) .toArray(PsiClass[]::new); if (targetClasses.length > 0) { PsiReference ref = restoreReference(); if (ref != null) { DumbService.getInstance(project).completeJustSubmittedTasks(); new AddImportAction(project, ref, editor, targetClasses).execute(); } } } } }