String (@NotNull List<? extends VirtualFile> files) { if (files.isEmpty()) return "Empty Selection"; String firstName = files.get(0).getName(); if (files.size() == 1) return firstName; if (files.size() == 2) return firstName + " and " + files.get(1).getName(); return firstName + " et al."; }