boolean (Project project, PsiPackage aPackage, @Nullable PsiDirectory currentDirectory) { final PsiDirectory[] directories = aPackage.getDirectories(); final VirtualFile[] virtualFiles = aPackage.occursInPackagePrefixes(); if (directories.length > 1 || virtualFiles.length > 0) { final @Nls StringBuffer message = new StringBuffer(); RenameUtil.buildPackagePrefixChangedMessage(virtualFiles, message, aPackage.getQualifiedName()); if (directories.length > 1) { DirectoryAsPackageRenameHandlerBase.buildMultipleDirectoriesInPackageMessage(message, aPackage.getQualifiedName(), directories, currentDirectory); message.append("\n\n"); String report = JavaRefactoringBundle .message("all.these.directories.will.be.moved.and.all.references.to.0.will.be.changed", aPackage.getQualifiedName()); message.append(report); } message.append("\n"); message.append(RefactoringBundle.message("do.you.wish.to.continue")); String resultMessage = message.toString(); int ret = Messages.showYesNoDialog(project, resultMessage, RefactoringBundle.message("warning.title"), Messages.getQuestionIcon()); if (ret != Messages.YES) { return false; } } return true; }