void (StringBuffer message, String packageQname, PsiDirectory[] directories, @Nullable PsiDirectory currentVDirectory) { message.append(RefactoringBundle.message("multiple.directories.correspond.to.package", packageQname)); final List<PsiDirectory> generated = new ArrayList<>(); final List<PsiDirectory> source = new ArrayList<>(); for (PsiDirectory directory : directories) { final VirtualFile virtualFile = directory.getVirtualFile(); if (GeneratedSourcesFilter.isGeneratedSourceByAnyFilter(virtualFile, directory.getProject())) { generated.add(directory); } else { source.add(directory); } } if (currentVDirectory != null && source.indexOf(currentVDirectory) > 0) { //ensure current on the first place source.remove(currentVDirectory); source.add(0, currentVDirectory); } final Function<PsiDirectory, String> directoryPresentation = directory -> presentableUrl(currentVDirectory, directory); appendRoots(message, source, directoryPresentation); if (!generated.isEmpty()) { message.append("\n\n").append(RefactoringBundle.message("also.generated")).append("\n"); appendRoots(message, generated, directoryPresentation); } }