void (PrintStream out) { out.println(myText); int count = myFiles.size(); int i = 0; for (VirtualFile file : myFiles) { out.println(file.getPresentableUrl()); count--; i++; if (i > 5 && count > 2) break; } if (count > 0) { out.println("And " + count + " more files"); } }