Collection<VirtualFile> (@NotNull Project project, @NotNull String ext, @NotNull GlobalSearchScope searchScope) { if (ext.isEmpty()) return Collections.emptyList(); String dotExt = "." + ext; int len = ext.length() + 1; Set<String> names = CollectionFactory.createSmallMemoryFootprintSet(); for (String name : getAllFilenames(project)) { int length = name.length(); if (length > len && name.substring(length - len).equalsIgnoreCase(dotExt)) { names.add(name); } } return getVirtualFilesByNames(names, searchScope, null); }