boolean (final PullUpDialog dialog) { final List<MemberInfo> infos = dialog.getSelectedMemberInfos(); final MemberInfo[] memberInfos = infos.toArray(new MemberInfo[0]); final PsiClass superClass = dialog.getSuperClass(); if (superClass == null || !checkWritable(superClass, memberInfos)) return false; final MultiMap<PsiElement, String> conflicts = new MultiMap<>(); if (!ProgressManager.getInstance().runProcessWithProgressSynchronously(() -> ApplicationManager.getApplication().runReadAction(() -> { final PsiDirectory targetDirectory = superClass.getContainingFile().getContainingDirectory(); final PsiPackage targetPackage = targetDirectory != null ? JavaDirectoryService.getInstance().getPackage(targetDirectory) : null; if (targetDirectory != null && targetPackage != null) { conflicts.putAllValues(PullUpConflictsUtil.checkConflicts(memberInfos, mySubclass, superClass, targetPackage, targetDirectory, dialog.getContainmentVerifier())); } }), RefactoringBundle.message("detecting.possible.conflicts"), true, myProject)) return false; if (!conflicts.isEmpty()) { ConflictsDialog conflictsDialog = new ConflictsDialog(myProject, conflicts, () -> new PullUpProcessor(mySubclass, superClass, infos.toArray(new MemberInfo[0]), new DocCommentPolicy(dialog.getJavaDocPolicy())).run()); boolean ok = conflictsDialog.showAndGet(); if (!ok && conflictsDialog.isShowConflicts()) dialog.close(DialogWrapper.CANCEL_EXIT_CODE); return ok; } return true; }