void () { Collection<File> files = new LinkedHashSet<>(); for (final String myFilePath : myFilePaths) { files.add(new File(myFilePath)); } GroupByPackages groupByPackages = new GroupByPackages(files); List<File> roots = groupByPackages.getRoots(); addFiles(this, roots, files, groupByPackages, null); }